rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
return | self.cl = self.data = None | def classifier(self, cl): self.closeContext() if not self.cl or not cl or not self.cl.domain == cl.domain: if cl: self.initClassValues(cl.domain.classVar) self.TargetClassIndex = 0 self.cl = cl if hasattr(self.cl, "data"): self.data = self.cl.data else: self.data = None | 56ab201dc64572e7703d211ea0ca65a659dfb394 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/56ab201dc64572e7703d211ea0ca65a659dfb394/OWNomogram.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14622,
12,
2890,
16,
927,
4672,
365,
18,
4412,
1042,
1435,
309,
486,
365,
18,
830,
578,
486,
927,
578,
486,
365,
18,
830,
18,
4308,
422,
927,
18,
4308,
30,
309,
927,
30,
365,
18,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14622,
12,
2890,
16,
927,
4672,
365,
18,
4412,
1042,
1435,
309,
486,
365,
18,
830,
578,
486,
927,
578,
486,
365,
18,
830,
18,
4308,
422,
927,
18,
4308,
30,
309,
927,
30,
365,
18,
2... |
owner.OnSignal(signal.SIGCHLD) | owner.OnSignal(signum) | def _CallSignalWaiters(self, signum): """Calls all signal waiters for a certain signal. | a9fe7232a7b8786aaf42994d5c0485cb3a167e96 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/a9fe7232a7b8786aaf42994d5c0485cb3a167e96/daemon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1477,
11208,
5480,
414,
12,
2890,
16,
26006,
4672,
3536,
10125,
777,
4277,
30487,
364,
279,
8626,
4277,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1477,
11208,
5480,
414,
12,
2890,
16,
26006,
4672,
3536,
10125,
777,
4277,
30487,
364,
279,
8626,
4277,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
links[i] = self.fix_fragment(m) | links[i] = self.fix_fragment(m.group(1), m.group(2)) | def fix_genindex(self, tree): """Fix href attributes for genindex pages. """ # XXX: modifies tree inline # Logic modeled from themes/basic/genindex.html for key, columns in tree: for entryname, (links, subitems) in columns: for (i, link) in enumerate(links): m = _refuri_re.match(link) if m: links[i] = self.fix_fragment(m) for subentryname, subentrylinks in subitems: for (i, link) in enumerate(subentrylinks): m = _refuri_re.match(link) if m: subentrylinks[i] = self.fix_fragment(m) | 753a266fffc3382cd7d5d4d9be435d203452b776 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5532/753a266fffc3382cd7d5d4d9be435d203452b776/epub.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
67,
4507,
1615,
12,
2890,
16,
2151,
4672,
3536,
8585,
3897,
1677,
364,
3157,
1615,
4689,
18,
3536,
468,
11329,
30,
23934,
2151,
6370,
468,
10287,
938,
329,
628,
15455,
19,
13240,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2917,
67,
4507,
1615,
12,
2890,
16,
2151,
4672,
3536,
8585,
3897,
1677,
364,
3157,
1615,
4689,
18,
3536,
468,
11329,
30,
23934,
2151,
6370,
468,
10287,
938,
329,
628,
15455,
19,
13240,
1... |
PersistExists = checkPersistWorkflow(workflow) if not PersistExists: print "Error: failed to set the Workflow %s. \n Check the $PRODAGENT_WORKDIR/RequestInjector/ComponentLog" | GoodWf=GoodWorkflow(workflow) if not GoodWf: print "Error: failed to set the Workflow %s. \nCheck the $PRODAGENT_WORKDIR/RequestInjector/ComponentLog"%workflow | def checkPersistWorkflow(workflow): """ Check if the Persist workflow already exists in WorkflowCache area """ WorkflowExists=False RequestDir,firstrun = getRequestInjectorConfig() workflowCache="%s/WorkflowCache"%RequestDir workflowSpec = WorkflowSpec() try: workflowSpec.load(workflow) except: return WorkflowExists PersistFile="%s/%s-Persist.xml"%(workflowCache,workflowSpec.workflowName()) if os.path.exists(PersistFile): WorkflowExists=True else: print "File %s does not exist"%PersistExists return WorkflowExists | fadb1a6b9cf85d72301243d86c8467f6bfa120b8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/fadb1a6b9cf85d72301243d86c8467f6bfa120b8/InjectTestLCG.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
12771,
8484,
12,
13815,
4672,
3536,
2073,
309,
326,
21583,
6095,
1818,
1704,
316,
11363,
1649,
5091,
3536,
11363,
4002,
33,
8381,
1567,
1621,
16,
74,
481,
701,
318,
273,
4328,
19210,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12771,
8484,
12,
13815,
4672,
3536,
2073,
309,
326,
21583,
6095,
1818,
1704,
316,
11363,
1649,
5091,
3536,
11363,
4002,
33,
8381,
1567,
1621,
16,
74,
481,
701,
318,
273,
4328,
19210,
... |
DeckPercentageTrump({"test": ">=", "value": 33.33, "ratio": 0.8}), | DeckPercentageTrump({"test": ">=", "value": 100/3, "ratio": 0.8}), | def __init__(self): self.objects = [ DeckPercentageTrump({"test": ">=", "value": 33.33, "ratio": 0.8}), # le test ne fonctionne pas comme souhaiter | 6a44382df024f7664c66fc05b0fbceab94a81852 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5117/6a44382df024f7664c66fc05b0fbceab94a81852/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
6911,
273,
306,
463,
762,
16397,
1070,
2801,
12590,
6,
3813,
6877,
14402,
1546,
16,
315,
1132,
6877,
2130,
19,
23,
16,
315,
9847,
6877,
374,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
6911,
273,
306,
463,
762,
16397,
1070,
2801,
12590,
6,
3813,
6877,
14402,
1546,
16,
315,
1132,
6877,
2130,
19,
23,
16,
315,
9847,
6877,
374,
1... |
if rowsadded > 0 and self._indexedrows <> self.nrows: raise RuntimeError , "Internal error: the number of indexed rows (%s) and rows in table (%s) must be equal!. Please, report this to the authors." % (self._indexedrows, self.nrows) | assert rowsadded <= 0 or self._indexedrows == self.nrows, \ ( "internal error: the number of indexed rows (%d) " "and rows in the table (%d) is not equal; " "please report this to the authors." % (self._indexedrows, self.nrows) ) | def flush(self): """Flush the table buffers.""" | 3e6372589f98c775b5e720d55480661601efb0e9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12687/3e6372589f98c775b5e720d55480661601efb0e9/table.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3663,
12,
2890,
4672,
3536,
8207,
326,
1014,
9664,
12123,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
3663,
12,
2890,
4672,
3536,
8207,
326,
1014,
9664,
12123,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
limit = 100 default = 20 | def index(self): if request.params.get('size'): limit = 100 default = 20 try: int_size = int(request.params.get('size')) except ValueError: int_size = default int_size = int_size if int_size <= limit else limit c.size = int_size session['changelog_size'] = c.size session.save() else: c.size = session.get('changelog_size', default) | 0207cce1860cae3a9ea6778d0154108862206bc8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/0207cce1860cae3a9ea6778d0154108862206bc8/changelog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
309,
590,
18,
2010,
18,
588,
2668,
1467,
11,
4672,
775,
30,
509,
67,
1467,
273,
509,
12,
2293,
18,
2010,
18,
588,
2668,
1467,
26112,
1335,
2068,
30,
509,
67,
146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
12,
2890,
4672,
309,
590,
18,
2010,
18,
588,
2668,
1467,
11,
4672,
775,
30,
509,
67,
1467,
273,
509,
12,
2293,
18,
2010,
18,
588,
2668,
1467,
26112,
1335,
2068,
30,
509,
67,
146... | |
for i in range(iterations): | for i in range(iterations): | def freeAttributes(self, iterations, steps, singleStep = False): attrList = self.getShownAttributeList() classes = [int(x.getclass()) for x in self.graph.rawdata] optimizer = self.lockToCircle and orangeom.optimizeAnchorsRadial or orangeom.optimizeAnchors ai = self.graph.attributeNameIndex attrIndices = [ai[label] for label in self.getShownAttributeList()] if not singleStep: minE = orangeom.computeEnergy(Numeric.transpose(self.graph.scaledData).tolist(), classes, self.graph.anchorData, attrIndices, self.attractG, -self.repelG) # repeat until less than 1% energy decrease in 5 consecutive iterations*steps steps noChange = 0 while noChange < 5: for i in range(iterations): self.graph.anchorData, E = optimizer(Numeric.transpose(self.graph.scaledData).tolist(), classes, self.graph.anchorData, attrIndices, self.attractG, -self.repelG, steps) self.energyLabel.setText("Energy: %.3f" % E) self.energyLabel.repaint() self.graph.updateData(attrList) self.graph.repaint() if singleStep: noChange = 5 else: if E > minE*0.99: noChange += 1 else: minE = E noChange = 0 | 40c2509d416a9941ff0b88f2e4a161e7800886f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/40c2509d416a9941ff0b88f2e4a161e7800886f3/OWRadviz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4843,
2498,
12,
2890,
16,
11316,
16,
6075,
16,
2202,
4160,
273,
1083,
4672,
1604,
682,
273,
365,
18,
588,
27042,
1499,
682,
1435,
3318,
273,
306,
474,
12,
92,
18,
588,
1106,
10756,
364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4843,
2498,
12,
2890,
16,
11316,
16,
6075,
16,
2202,
4160,
273,
1083,
4672,
1604,
682,
273,
365,
18,
588,
27042,
1499,
682,
1435,
3318,
273,
306,
474,
12,
92,
18,
588,
1106,
10756,
364... |
history = self.talk_page.getLatestEditor(limit = 10) | history = self.talk_page.getLatestEditors(limit = 10) | def put_mex_in_talk(self): """ Function to put the warning in talk page of the uploader.""" commento2 = wikipedia.translate(self.site, comm2) emailPageName = wikipedia.translate(self.site, emailPageWithText) emailSubj = wikipedia.translate(self.site, emailSubject) if self.notification2 == None: self.notification2 = self.notification else: self.notification2 = self.notification2 % self.image_to_report second_text = False # Getting the talk page's history, to check if there is another advise... # The try block is used to prevent error if you use an old wikipedia.py's version. try: testoattuale = self.talk_page.get() history = self.talk_page.getLatestEditor(limit = 10) latest_user = history[0]["user"] wikipedia.output(u'The latest user that has written something is: %s' % latest_user) for i in self.botolist: if latest_user == i: second_text = True # A block to prevent the second message if the bot also welcomed users... if history[0]['timestamp'] == history[-1]['timestamp']: second_text = False except wikipedia.IsRedirectPage: wikipedia.output(u'The user talk is a redirect, trying to get the right talk...') try: self.talk_page = self.talk_page.getRedirectTarget() testoattuale = self.talk_page.get() except wikipedia.NoPage: second_text = False ti_es_ti = wikipedia.translate(self.site, empty) testoattuale = ti_es_ti except wikipedia.NoPage: wikipedia.output(u'The user page is blank') second_text = False ti_es_ti = wikipedia.translate(self.site, empty) testoattuale = ti_es_ti if self.commTalk == None: commentox = commento2 else: commentox = self.commTalk if second_text == True: self.talk_page.put(u"%s\n\n%s" % (testoattuale, self.notification2), comment = commentox, minorEdit = False) elif second_text == False: self.talk_page.put(testoattuale + self.head + self.notification, comment = commentox, minorEdit = False) if emailPageName != None and emailSubj != None: emailPage = wikipedia.Page(self.site, emailPageName) try: emailText = emailPage.get() except (wikipedia.NoPage, wikipedia.IsRedirectPage): return # Exit if self.sendemailActive: text_to_send = re.sub(r'__user-nickname__', r'%s' % self.luser, emailText) emailClass = EmailSender(self.site, self.luser) emailClass.send(emailSubj, text_to_send) | 9c30df9640ac105c2f986f38a24b1b77d37f4e51 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/9c30df9640ac105c2f986f38a24b1b77d37f4e51/checkimages.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1378,
67,
81,
338,
67,
267,
67,
88,
2960,
12,
2890,
4672,
3536,
4284,
358,
1378,
326,
3436,
316,
26591,
1363,
434,
326,
25062,
12123,
2879,
83,
22,
273,
21137,
18,
13929,
12,
2890,
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,
1378,
67,
81,
338,
67,
267,
67,
88,
2960,
12,
2890,
4672,
3536,
4284,
358,
1378,
326,
3436,
316,
26591,
1363,
434,
326,
25062,
12123,
2879,
83,
22,
273,
21137,
18,
13929,
12,
2890,
18,... |
<br/><br/><strong>Cited by:</strong> try citation search for <a href="http://pcdh23.cern.ch/search?f=reference&p=hep-th/0003295">hep-th/0003295</a> | <br/><br/><strong>Cited by:</strong> try citation search for <a href="%(weburl)s/search?f=reference&p=hep-th/0003295">hep-th/0003295</a> | def setUp(self): """Prepare some ideal outputs""" self.record_74_hd = '''<table border="0" width="100%"><tr class="blocknote"><td valign="left"> | 8e9466aff4b3b55478b17bc559b21d034ec18350 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2763/8e9466aff4b3b55478b17bc559b21d034ec18350/bibformat_regression_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
3536,
7543,
2690,
23349,
6729,
8395,
365,
18,
3366,
67,
5608,
67,
22057,
273,
9163,
32,
2121,
5795,
1546,
20,
6,
1835,
1546,
6625,
9,
14050,
313,
667,
1546,
2629,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24292,
12,
2890,
4672,
3536,
7543,
2690,
23349,
6729,
8395,
365,
18,
3366,
67,
5608,
67,
22057,
273,
9163,
32,
2121,
5795,
1546,
20,
6,
1835,
1546,
6625,
9,
14050,
313,
667,
1546,
2629,
... |
print "You actually pressed a number (" + str(number) + ") which will be added at block number " + str(blocknumber) + " on position " + str(posinblock) print "Old value: " + str(oldvalue) + " olddec: " + str(olddec) + " newvalue: " + str(newvalue) | def handleKey(self, key): #this will no change anything on the value itself #so we can handle it here in gui element if key == config.key["prevElement"]: self.markedPos -= 1 if key == config.key["nextElement"]: self.markedPos += 1 if key >= config.key["0"] and key <= config.key["9"]: self.blockLen = [] for x in self.valueBounds: self.blockLen.append(len(str(x[1]))) pos = 0 blocknumber = 0 self.blockLenTotal = [0,] for x in self.blockLen: pos += self.blockLen[blocknumber] self.blockLenTotal.append(pos) if (pos - 1 >= self.markedPos): pass else: blocknumber += 1 number = 9 - config.key["9"] + key # length of numberblock numberLen = len(str(self.valueBounds[blocknumber][1])) # position in the block posinblock = self.markedPos - self.blockLenTotal[blocknumber] oldvalue = self.parent.value[blocknumber] olddec = oldvalue % 10 ** (numberLen - posinblock) - (oldvalue % 10 ** (numberLen - posinblock - 1)) newvalue = oldvalue - olddec + (10 ** (numberLen - posinblock - 1) * number) print "You actually pressed a number (" + str(number) + ") which will be added at block number " + str(blocknumber) + " on position " + str(posinblock) print "Old value: " + str(oldvalue) + " olddec: " + str(olddec) + " newvalue: " + str(newvalue) self.parent.value[blocknumber] = newvalue self.markedPos += 1 self.checkValues() print "markPos:", print self.markedPos | 98efaa152afc767093651fc0a2316d90a19f757a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/98efaa152afc767093651fc0a2316d90a19f757a/config.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
653,
12,
2890,
16,
498,
4672,
468,
2211,
903,
1158,
2549,
6967,
603,
326,
460,
6174,
468,
2048,
732,
848,
1640,
518,
2674,
316,
13238,
930,
309,
498,
422,
642,
18,
856,
9614,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
653,
12,
2890,
16,
498,
4672,
468,
2211,
903,
1158,
2549,
6967,
603,
326,
460,
6174,
468,
2048,
732,
848,
1640,
518,
2674,
316,
13238,
930,
309,
498,
422,
642,
18,
856,
9614,
100... | |
except DistutilsExecError, msg: | except DistutilsExecError as msg: | def link(self, target_desc, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None): | b3c6ed5e10916734bf0bd96fcf21743ab916efd4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/b3c6ed5e10916734bf0bd96fcf21743ab916efd4/msvc9compiler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1692,
12,
2890,
16,
1018,
67,
5569,
16,
2184,
16,
876,
67,
3459,
16,
876,
67,
1214,
33,
7036,
16,
14732,
33,
7036,
16,
5313,
67,
8291,
33,
7036,
16,
3099,
67,
12083,
67,
8291,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1692,
12,
2890,
16,
1018,
67,
5569,
16,
2184,
16,
876,
67,
3459,
16,
876,
67,
1214,
33,
7036,
16,
14732,
33,
7036,
16,
5313,
67,
8291,
33,
7036,
16,
3099,
67,
12083,
67,
8291,
33,
... |
end_time_s = {} end_time_ns = {} | end_time = {} | def populate_inspiral_tables(MBTA_frame, set_keys = MBTA_set_keys, \ event_id_dict = insp_event_id_dict): """ create xml file and populate the SnglInspiral and CoincInspiral tables from a coinc .gwf file from MBTA xmldoc: xml file to append the tables to MBTA_frame: frame file to get info about triggers from set_keys: columns in the SnglInspiral Table to set process_id: process_id event_id_dict: {ifo:event_id} dictionary to assign event_id's coinc_event_id: coinc_event_id detectors: detectors participating in the coinc returns xmldoc and contents of the comment field """ #initialize xml document xmldoc = ligolw.Document() xmldoc.appendChild(ligolw.LIGO_LW()) #dictionaries to store about individual triggers end_time_s = {} end_time_ns = {} snr = {} mass1 = {} mass2 = {} Deff = {} mchirp = {} eta = {} #extract the information from the frame file events = Fr.frgetevent(MBTA_frame) #get the ifos from the event name for event in events: if 'MbtaHLV' in event['name']: detectors = H1L1V1_detlist elif 'MbtaHL' in event['name']: detectors = H1L1_detlist elif 'MbtaHV' in event['name']: detectors = H1V1_detlist elif 'MbtaH' in event['name']: detectors = H1_detlist elif 'MbtaLV' in event['name']: detectors = L1V1_detlist elif 'MbtaL' in event['name']: detectors = L1_detlist elif 'MbtaV' in event['name']: detectors = V1_detlist else: raise ValueError, "Invalid FrEvent name" log_data = event['comment'] + '\n' far = [line.split(':')[1].split()[0] for line in log_data.splitlines() if \ 'False Alarm Rate' in line][0] for ifo in detectors: end_time_s[ifo], end_time_ns[ifo] = str(event[ifo+':end_time']).split('.') snr[ifo] = float(event[ifo+':SNR']) mass1[ifo] = float(event[ifo+':mass1']) mass2[ifo] = float(event[ifo+':mass2']) mchirp[ifo], eta[ifo] = compute_mchirp_eta(mass1[ifo],mass2[ifo]) Deff[ifo] = float(event[ifo+':eff_distance']) #fill the SnglInspiralTable sin_table = lsctables.New(lsctables.SnglInspiralTable) xmldoc.childNodes[0].appendChild(sin_table) process_id = lsctables.ProcessTable.get_next_id() for ifo in detectors: row = sin_table.RowType() row.ifo = ifo row.search = 'MBTA' row.end_time = int(end_time_s[ifo]) row.end_time_ns = int(end_time_ns[ifo]) row.mass1 = mass1[ifo] row.mass2 = mass2[ifo] row.mchirp = mchirp[ifo] row.mtotal = mass1[ifo] + mass2[ifo] row.eta = eta[ifo] row.snr = snr[ifo] row.eff_distance = Deff[ifo] row.event_id = event_id_dict[ifo] row.process_id = process_id row.channel = '' #zero out the rest of the columns #should work in chi2 and chi2cut for key in sin_table.validcolumns.keys(): if key not in set_keys: setattr(row,key,None) sin_table.append(row) #CoincInspiralTable #using the conventions found in: #https://www.lsc-group.phys.uwm.edu/ligovirgo/cbcnote/S6Plan/ #090505160219S6PlanningNotebookCoinc_and_Experiment_Tables_ihope_implementation? #highlight=%28coinc%29|%28table%29 temp_data_loc = None if len(detectors) < 2: return xmldoc, log_data, temp_data_loc #coinc_event_id = coinc_event_id_base + str(UID) cin_table = lsctables.New(lsctables.CoincInspiralTable) xmldoc.childNodes[0].appendChild(cin_table) row = cin_table.RowType() row.set_ifos(detectors) cid = lsctables.CoincTable.get_next_id() row.coinc_event_id = cid row.end_time = int(end_time_s['H1']) row.end_time_ns = int(end_time_ns['H1']) row.mass = (sum(mass1.values()) + sum(mass2.values()))/3 row.mchirp = sum(mchirp.values())/3 #the snr here is really the snr NOT effective snr row.snr = pow(sum([x*x for x in snr.values()]),0.5) #far is triggers/day row.false_alarm_rate = float(far) row.combined_far = 0 cin_table.append(row) xmldoc = populate_coinc_tables(xmldoc,cid,insp_event_id_dict,\ InspiralCoincDef,detectors) return xmldoc, log_data, temp_data_loc | 86dbc3dd8a6021f67c93bf5f04ddd1f8d2aa4e59 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/86dbc3dd8a6021f67c93bf5f04ddd1f8d2aa4e59/utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
267,
1752,
481,
287,
67,
9373,
12,
7969,
9833,
67,
3789,
16,
444,
67,
2452,
273,
17897,
9833,
67,
542,
67,
2452,
16,
521,
871,
67,
350,
67,
1576,
273,
316,
1752,
67,
2575,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
267,
1752,
481,
287,
67,
9373,
12,
7969,
9833,
67,
3789,
16,
444,
67,
2452,
273,
17897,
9833,
67,
542,
67,
2452,
16,
521,
871,
67,
350,
67,
1576,
273,
316,
1752,
67,
2575,
... |
avg = qda and total/qda or 0.0, | avg = qda and total/qda or 0.0 | def procesar_producto(self, cr, uid, ids, prod_id, Dict, loc_ids, inter_loc_ids, prod_loc_ids, pending=False): ''' Concepto de prueba de Humberto Arocha para procesamiento recursivo de de stock card line ''' rpp_obj = self.pool.get('report.profit.picking') sc_line_obj = self.pool.get('stock.card.line') product = Dict[prod_id] sml_x_pd_id = product['sml'] no_cump = product['no_cump'] total = product['total'] avg = product['avg'] qda = product['qda'] cont = product['cont'] seq = product['seq'] def_code = self.pool.get('product.product').browse(cr,uid,prod_id).default_code.strip() if pending: print '@'*10 print 'procesando: ',self.pool.get('product.product').browse(cr,uid,prod_id).name #~ time.sleep(10) while sml_x_pd_id: sml_id = sml_x_pd_id.pop(0) value={} if not cont: cont = True q = 0.0 subtotal = 0.0 qda = 0.0 #se debe buscar el costo inicial cr.execute('SELECT standard_price,product_qty FROM lst_cost ' \ 'WHERE default_code=%s', (def_code,)) res = cr.fetchall() if res and res[0][1]: print 'encontre costo inicccc' avg,q = res[0] else: rpp = rpp_obj.browse(cr,uid,sml_id) if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'in_invoice': q = rpp.picking_qty print 'cantidad inicialxxxxx: ',q avg = rpp.invoice_price_unit else: no_cump.append(sml_id) continue #avg = 1430.96 #q = 5.0 print 'cantidad inicial: ',q print 'costo inicial: ',avg total = avg*q subtotal = avg*q qda = q seq += 1 value = { 'subtotal':subtotal, 'total':total, 'avg':avg, 'stk_bef_cor':q, 'stk_aft_cor':qda, 'sequence':seq } scl_id = sc_line_obj.search(cr, uid, [('stk_mov_id','=',sml_id)]) sc_line_obj.write(cr, uid, scl_id, value) print 'q inicial: ',q print 'avg: ',avg print 'qda inicial: ',qda print 'seq inicial: ',seq else: rpp = rpp_obj.browse(cr,uid,sml_id) q = rpp.picking_qty scl_id = sc_line_obj.search(cr, uid, [('stk_mov_id','=',sml_id)]) scl = sc_line_obj.browse(cr,uid,scl_id)[0] print 'viene operac: ',sml_id print 'packing: ',rpp.picking_id.name print 'seq antes operac: ',seq #VENTA if rpp.location_id.id == loc_ids and rpp.invoice_id.type == 'out_invoice': print 'validando VENTA:' qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq #NC COMPRA if rpp.location_id.id == loc_ids and (rpp.invoice_id.type == 'in_refund' or rpp.invoice_id.type == 'in_invoice'): print 'validando NC compra:' qda,total,avg,no_cump,seq= \ self.validate_nc_compra(cr,uid,ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq #COMPRA if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'in_invoice': print 'procesooo compra:' q_bef = qda qda,subtotal,total,avg = self.compute_compra(cr, uid, ids,scl,q,total,avg,qda) #REALIZAR EL WRITE DE LA LINEA value = { 'subtotal':subtotal, 'total':total, 'avg':avg, 'stk_bef_cor':q_bef, 'stk_aft_cor':qda } seq=self.write_data(cr, uid, ids, scl.id, value, seq) print 'seq despues operac: ',seq if no_cump: print 'agregando nuevamente las vta:' #no_cump.append(sml_id) no_cump.extend(sml_x_pd_id) print 'no cumplioooo: ',no_cump sml_x_pd_id = no_cump print 'nueva listaaa: ',sml_x_pd_id no_cump = [] #NC VENTA if rpp.location_dest_id.id == loc_ids and rpp.invoice_id.type == 'out_refund': print 'validando NC VENTA:' qda,total,avg,no_cump,seq= \ self.validate_nc_vta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq if no_cump and not scl.parent_id: print 'agregando nuevamente los movimientos:' #no_cump.append(sml_id) no_cump.extend(sml_x_pd_id) print 'no cumplioooo: ',no_cump sml_x_pd_id = no_cump print 'nueva listaaa: ',sml_x_pd_id no_cump = [] #DESTINO USO INTERNO if rpp.location_id.id == loc_ids and rpp.location_dest_id.id == inter_loc_ids: print 'validando USO INTERNO:' #fixme blanquear la variables de cuenta #acc_src = None #acc_dest = None qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq valores = {} if not (rpp.aml_cost_id or rpp.aml_inv_id): move = scl.stk_mov_id acc_src = move.product_id.product_tmpl_id.\ property_stock_account_output.id if move.location_dest_id.account_id: acc_dest = move.location_dest_id.account_id.id acc_mov_id = self.write_aml(cr, uid, ids, scl, q, avg, acc_src, acc_dest) acc_mov_obj = self.pool.get('account.move').browse(cr,uid,acc_mov_id) for aml in acc_mov_obj.line_id: valores.update({ 'aml_cost_qty':aml.quantity or 0.0, 'aml_cost_price_unit':avg, 'aml_inv_qty':aml.quantity or 0.0, 'aml_inv_price_unit':avg}) if aml.debit: valores.update({'aml_cost_id':aml.id}) if aml.credit: valores.update({'aml_inv_id':aml.id}) sc_line_obj.write(cr, uid, scl.id, valores) #~ else: #~ id1=scl.aml_cost_id.id #~ id2=scl.aml_inv_id.id #~ if not scl.aml_cost_id.credit: #~ valores.update({'aml_cost_id':id2, 'aml_inv_id':id1}) #~ sc_line_obj.write(cr, uid, scl.id, valores) #~ #DESTINO PROCESAMIENTO if rpp.location_id.id == loc_ids and rpp.location_dest_id.id == prod_loc_ids: print 'validando PROCESAMIENTO:' #fixme blanquear la variables de cuenta #acc_src = None #acc_dest = None qda,total,avg,no_cump,seq= \ self.validate_venta(cr, uid, ids,scl,q,total,avg,qda,no_cump,sml_x_pd_id,sml_id,seq) print 'seq despues operac: ',seq valores = {} if not (rpp.aml_cost_id or rpp.aml_inv_id): move = scl.stk_mov_id acc_src = move.product_id.product_tmpl_id.\ property_stock_account_output.id if move.location_dest_id.account_id: acc_dest = move.location_dest_id.account_id.id | 72a1b28e2cc4a2ce6f1c992caa76593ef2136819 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7359/72a1b28e2cc4a2ce6f1c992caa76593ef2136819/stock_card.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
450,
764,
297,
67,
5896,
83,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10791,
67,
350,
16,
9696,
16,
1515,
67,
2232,
16,
1554,
67,
1829,
67,
2232,
16,
10791,
67,
1829,
67,
2232,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
450,
764,
297,
67,
5896,
83,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
10791,
67,
350,
16,
9696,
16,
1515,
67,
2232,
16,
1554,
67,
1829,
67,
2232,
16,
10791,
67,
1829,
67,
2232,
... |
def InitFunction(self, func): """Overrriden from TypeHandler.""" cmd_args = func.GetCmdArgs() func.ClearCmdArgs() func.AddCmdArg(cmd_args[0]) func.AddCmdArg(Argument('bucket_id', 'uint32')) | def InitFunction(self, func): """Overrriden from TypeHandler.""" # remove all but the first cmd args. cmd_args = func.GetCmdArgs() func.ClearCmdArgs() func.AddCmdArg(cmd_args[0]) # add on a bucket id. func.AddCmdArg(Argument('bucket_id', 'uint32')) | b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4378,
2083,
12,
2890,
16,
1326,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
468,
1206,
777,
1496,
326,
1122,
1797,
833,
18,
1797,
67,
1968,
273,
1326,
18,
967,
5931,
2615,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4378,
2083,
12,
2890,
16,
1326,
4672,
3536,
22042,
1691,
275,
628,
1412,
1503,
12123,
468,
1206,
777,
1496,
326,
1122,
1797,
833,
18,
1797,
67,
1968,
273,
1326,
18,
967,
5931,
2615,
1435... | |
env[op.result] = resbox.clonebox() | env[op.result] = resbox | def execute_operations(self, loop, valueboxes): valueboxes = [box.clonebox() for box in valueboxes] self.clear_exception() self._guard_failed = False while True: env = {} assert len(valueboxes) == len(loop.inputargs) for i in range(len(valueboxes)): env[loop.inputargs[i]] = valueboxes[i] operations = loop.operations i = 0 # while True: assert i < len(operations), ("reached the end without " "seeing a final op") op = operations[i] i += 1 argboxes = [] for box in op.args: if isinstance(box, Box): box = env[box] argboxes.append(box) if op.is_final(): break if op.is_guard(): try: resbox = self.execute_guard(op.opnum, argboxes) except GuardFailed: self._guard_failed = True operations = op.suboperations i = 0 continue else: resbox = executor._execute_nonspec(self, op.opnum, argboxes, op.descr) if op.result is not None: assert resbox is not None env[op.result] = resbox.clonebox() else: assert resbox is None # if op.opnum == rop.JUMP: loop = op.jump_target valueboxes = argboxes continue if op.opnum == rop.FAIL: break assert 0, "bad opnum" # for i in range(len(op.args)): box = op.args[i] if isinstance(box, BoxInt): value = env[box].getint() box.changevalue_int(value) elif isinstance(box, BoxPtr): value = env[box].getptr_base() box.changevalue_ptr(value) return op | 66e3faea9cc0028d929448919ab03447405e7083 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/66e3faea9cc0028d929448919ab03447405e7083/runner.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
67,
17542,
12,
2890,
16,
2798,
16,
460,
15918,
4672,
460,
15918,
273,
306,
2147,
18,
14056,
2147,
1435,
364,
3919,
316,
460,
15918,
65,
365,
18,
8507,
67,
4064,
1435,
365,
6315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
17542,
12,
2890,
16,
2798,
16,
460,
15918,
4672,
460,
15918,
273,
306,
2147,
18,
14056,
2147,
1435,
364,
3919,
316,
460,
15918,
65,
365,
18,
8507,
67,
4064,
1435,
365,
6315,
... |
self.Stats["failure"] = self.Stats["failure"] + 1 | self.incr("failure"); | def run(self, max=1): ( | cbae1bc2cd3fb2b2a25a19b82b1f442a73df3753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5112/cbae1bc2cd3fb2b2a25a19b82b1f442a73df3753/CTS.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
943,
33,
21,
4672,
261,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
16,
943,
33,
21,
4672,
261,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
self.parent.deckadj.set_value(self.volume) self.parent.deck2adj.set_value(self.volume) | v1 = self.parent.deckadj.get_value() v2 = self.parent.deck2adj.get_value() if max((v1, v2)) <= self.NORMAL: self.parent.deckadj.set_value(self.volume1) self.parent.deck2adj.set_value(self.volume2) | def stop_player(self, flush = True): if self.playing: self.playing = False self.entry.set_sensitive(True) print "Stop player" if flush == True: print "stop with flush" self.parent.mixer_write("ACTN=stopjingles\nend\n", True) else: print "stop without flush" self.stop.clicked() # this will take care of resetting the play button without triggering a flush if self.nomute == False: self.parent.deckadj.set_value(self.volume) self.parent.deck2adj.set_value(self.volume) if self.interludevolume != -1: self.interadj.set_value(self.interludevolume) else: self.parent.send_new_mixer_stats() | a9d8325d570ae47ee1cc7faeb14a61ba574b6f52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7615/a9d8325d570ae47ee1cc7faeb14a61ba574b6f52/IDJCjingles.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
67,
14872,
12,
2890,
16,
3663,
273,
1053,
4672,
309,
365,
18,
1601,
310,
30,
365,
18,
1601,
310,
273,
1083,
365,
18,
4099,
18,
542,
67,
23481,
12,
5510,
13,
1172,
315,
4947,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2132,
67,
14872,
12,
2890,
16,
3663,
273,
1053,
4672,
309,
365,
18,
1601,
310,
30,
365,
18,
1601,
310,
273,
1083,
365,
18,
4099,
18,
542,
67,
23481,
12,
5510,
13,
1172,
315,
4947,
72... |
/.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --chandlerTests=TestCreateAccounts -D2 -M0 | /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --chandlerTests=TestAllDayEvent -D2 -M0 | def main(options): """ >>> options = parseOptions() >>> options.dryrun = True >>> options.verbose = True >>> main(options) False Try and run a test that does not exist >>> options.single = 'TestFoo.py' >>> main(options) Test(s) not found False Try different single tests single unit test: >>> options.single = 'TestCrypto' >>> main(options) /.../RunPython... application/tests/TestCrypto.py -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False unit test and functional test: >>> options.single = 'TestCrypto,TestSharing' >>> main(options) /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --chandlerTests=TestSharing -D2 -M0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + /.../RunPython... application/tests/TestCrypto.py -v - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False unit, functional and two perf tests, one of which is a startup test: >>> options.single = 'TestCrypto,TestSharing,PerfImportCalendar,startup_large' >>> main(options) /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfImportCalendar.py --create PerfImportCalendar.py 0.00 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | 0.00 ... 0.00 /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --chandlerTests=TestSharing -D2 -M0 ... /.../RunPython... application/tests/TestCrypto.py -v ... Creating repository for startup time tests ... Startup_with_large_calendar ... ... False Try and specify an invalid mode >>> options.single = '' >>> options.mode = 'foo' >>> main(options) foo removed from mode list False Run unit tests with --dryrun >>> options.mode = None >>> options.unit = True >>> main(options) /.../RunPython... .../tests/TestReferenceAttributes.py -v ... /.../RunPython... setup.py test -v ... False Run unitSuite with --dryrun >>> options.mode = None >>> options.unit = False >>> options.unitSuite = True >>> main(options) /.../RunPython... tools/run_tests.py -v application i18n osaf repository - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False Run functional tests with --dryrun >>> options.unit = False >>> options.unitSuite = False >>> options.funcSuite = True >>> main(options) /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --scriptFile=tools/cats/Functional/FunctionalTestSuite.py -D2 -M0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + False Run functional tests each in its on process >>> options.funcSuite = False >>> options.func = True >>> main(options) /.../RunChandler... --create --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --chandlerTests=TestCreateAccounts -D2 -M0 - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + ... False Run performance tests with --dryrun >>> options.func = False >>> options.perf = True >>> options.profile = False >>> main(options) /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfImportCalendar.py --create PerfImportCalendar.py ... ... /.../RunChandler... --catch=tests --profileDir=test_profile --parcelPath=tools/QATestScripts/DataFiles --catsPerfLog=test_profile/time.log --scriptFile=tools/QATestScripts/Performance/PerfLargeDataResizeCalendar.py --restore=test_profile/__repository__.001 PerfLargeDataResizeCalendar.py ... ... Creating repository for startup time tests ... Startup ... ... False """ checkOptions(options) failed = False if options.mode is None: options.modes = modes = ['release', 'debug'] # silently clear any missing modes if default list is specified for mode in modes: if not os.path.isdir(os.path.join(options.chandlerBin, mode)): options.modes.remove(mode) else: options.mode = options.mode.strip().lower() options.modes = [ options.mode ] # complain about any missing modes if mode was explicitly stated if not os.path.isdir(os.path.join(options.chandlerBin, options.mode)): options.modes.remove(options.mode) log('%s removed from mode list' % options.mode) if len(options.modes) == 0: log('%s mode requested but not found -- stopping test run' % options.mode) failed = True if not failed: try: # Empty the log file so that we won't be confused by old results later f = open(os.path.join(options.profileDir, 'chandler.log'), 'w') f.close() except IOError: pass # Remove old perf log files (we leave the the latest) for f in glob.glob(os.path.join(options.profileDir, '*.log.*')): try: os.remove(f) except OSError: pass if options.single: failed = runSingles(options) else: if options.unit: failed = runUnitTests(options) if not failed or options.noStop: if runPluginTests(options): failed = True if options.unitSuite and (not failed or options.noStop): if runUnitSuite(options): failed = True if options.funcSuite and (not failed or options.noStop): if runFuncTest(options): failed = True if options.func and (not failed or options.noStop): if runFuncTestsSingly(options): failed = True if options.recorded and (not failed or options.noStop): if runRecordedScripts(options): failed = True if options.perf and (not failed or options.noStop): if runPerfTests(options): failed = True if len(failedTests) > 0: log('+-' * 32) log('The following tests failed:') log('\n'.join(failedTests)) log('') return failed | b699ba32e2c975274e5bcf6e3ec7d39769952732 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/b699ba32e2c975274e5bcf6e3ec7d39769952732/rt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
4672,
3536,
4080,
702,
273,
1109,
1320,
1435,
4080,
702,
18,
25011,
2681,
225,
273,
1053,
4080,
702,
18,
11369,
273,
1053,
4080,
2774,
12,
2116,
13,
1083,
225,
6161,
471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
4672,
3536,
4080,
702,
273,
1109,
1320,
1435,
4080,
702,
18,
25011,
2681,
225,
273,
1053,
4080,
702,
18,
11369,
273,
1053,
4080,
2774,
12,
2116,
13,
1083,
225,
6161,
471,... |
print l, type(l) print v, type(l) | def test_xor(self): x, y = bvector(), bvector() fn = function([x,y], [x^y]) ix = x ix ^= y gn = function([x,y], [ix]) l = numpy.asarray([0,0,1,1]) r = numpy.asarray([0,1,0,1]) v = fn(l, r) self.failUnless(numpy.all(v == (operator.xor(l, r))), (l, r, v)) print ' ' print l, type(l) v = gn(l, r) #test the in-place stuff print l, type(l) print v, type(l) self.failUnless(numpy.all(l == numpy.asarray([0,1,1,0])), l) | 9af1c0944b85151c5268216a8f63dd46bc7c04dd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12438/9af1c0944b85151c5268216a8f63dd46bc7c04dd/_test_tensor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
31346,
12,
2890,
4672,
619,
16,
677,
273,
324,
7737,
9334,
324,
7737,
1435,
2295,
273,
445,
3816,
92,
16,
93,
6487,
306,
92,
66,
93,
5717,
8288,
273,
619,
8288,
10352,
677,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31346,
12,
2890,
4672,
619,
16,
677,
273,
324,
7737,
9334,
324,
7737,
1435,
2295,
273,
445,
3816,
92,
16,
93,
6487,
306,
92,
66,
93,
5717,
8288,
273,
619,
8288,
10352,
677,
... | |
labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) | def CreatePageKeys(self): #tkVars self.bindingTarget=StringVar(self) self.builtinKeys=StringVar(self) self.customKeys=StringVar(self) self.keysAreBuiltin=BooleanVar(self) self.keyBinding=StringVar(self) ##widget creation #body frame frame=self.tabPages.pages['Keys']['page'] #body section frames frameCustom=Frame(frame,borderwidth=2,relief=GROOVE) frameKeySets=Frame(frame,borderwidth=2,relief=GROOVE) #frameCustom frameTarget=Frame(frameCustom) labelCustomTitle=Label(frameCustom,text='Set Custom Key Bindings') labelTargetTitle=Label(frameTarget,text='Action - Key(s)') scrollTargetY=Scrollbar(frameTarget) scrollTargetX=Scrollbar(frameTarget,orient=HORIZONTAL) self.listBindings=Listbox(frameTarget,takefocus=FALSE, exportselection=FALSE) self.listBindings.bind('<ButtonRelease-1>',self.KeyBindingSelected) scrollTargetY.config(command=self.listBindings.yview) scrollTargetX.config(command=self.listBindings.xview) self.listBindings.config(yscrollcommand=scrollTargetY.set) self.listBindings.config(xscrollcommand=scrollTargetX.set) self.buttonNewKeys=Button(frameCustom,text='Get New Keys for Selection', command=self.GetNewKeys,state=DISABLED) buttonSaveCustomKeys=Button(frameCustom, text='Save as New Custom Key Set',command=self.SaveAsNewKeySet) #frameKeySets labelKeysTitle=Label(frameKeySets,text='Select a Key Set') labelTypeTitle=Label(frameKeySets,text='Select : ') self.radioKeysBuiltin=Radiobutton(frameKeySets,variable=self.keysAreBuiltin, value=1,command=self.SetKeysType,text='a Built-in Key Set') self.radioKeysCustom=Radiobutton(frameKeySets,variable=self.keysAreBuiltin, value=0,command=self.SetKeysType,text='a Custom Key Set') self.optMenuKeysBuiltin=DynOptionMenu(frameKeySets, self.builtinKeys,None,command=None) self.optMenuKeysCustom=DynOptionMenu(frameKeySets, self.customKeys,None,command=None) self.buttonDeleteCustomKeys=Button(frameKeySets,text='Delete Custom Key Set', command=self.DeleteCustomKeys) ##widget packing #body frameCustom.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH) frameKeySets.pack(side=LEFT,padx=5,pady=5,fill=Y) #frameCustom labelCustomTitle.pack(side=TOP,anchor=W,padx=5,pady=5) buttonSaveCustomKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5) self.buttonNewKeys.pack(side=BOTTOM,fill=X,padx=5,pady=5) frameTarget.pack(side=LEFT,padx=5,pady=5,expand=TRUE,fill=BOTH) #frame target frameTarget.columnconfigure(0,weight=1) frameTarget.rowconfigure(1,weight=1) labelTargetTitle.grid(row=0,column=0,columnspan=2,sticky=W) self.listBindings.grid(row=1,column=0,sticky=NSEW) scrollTargetY.grid(row=1,column=1,sticky=NS) scrollTargetX.grid(row=2,column=0,sticky=EW) #frameKeySets labelKeysTitle.pack(side=TOP,anchor=W,padx=5,pady=5) labelTypeTitle.pack(side=TOP,anchor=W,padx=5,pady=5) self.radioKeysBuiltin.pack(side=TOP,anchor=W,padx=5) self.radioKeysCustom.pack(side=TOP,anchor=W,padx=5,pady=2) self.optMenuKeysBuiltin.pack(side=TOP,fill=X,padx=5,pady=5) self.optMenuKeysCustom.pack(side=TOP,fill=X,anchor=W,padx=5,pady=5) self.buttonDeleteCustomKeys.pack(side=TOP,fill=X,padx=5,pady=5) return frame | 55017c8d2483230b370f09b40eaa33e91cc2555a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/55017c8d2483230b370f09b40eaa33e91cc2555a/configDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
1964,
2396,
12,
2890,
4672,
468,
16099,
5555,
365,
18,
7374,
2326,
33,
780,
1537,
12,
2890,
13,
365,
18,
24553,
2396,
33,
780,
1537,
12,
2890,
13,
365,
18,
3662,
2396,
33,
780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1788,
1964,
2396,
12,
2890,
4672,
468,
16099,
5555,
365,
18,
7374,
2326,
33,
780,
1537,
12,
2890,
13,
365,
18,
24553,
2396,
33,
780,
1537,
12,
2890,
13,
365,
18,
3662,
2396,
33,
780,
... | |
print 'gimp_composite_init()' | print 'gimp_composite_init (void)' | def gimp_composite_init(function_tables): for o in function_tables: print 'extern void %s_init();' % (functionnameify(o[0])) pass print '' print 'void' print 'gimp_composite_init()' print '{' print ' char *p;' print '' print ' if ((p = getenv("GIMP_COMPOSITE"))) {' print ' gimp_composite_options.use = atol(p);' print ' g_printerr("Using new image composite functions\n");' print ' }' print '' print ' if (!gimp_composite_options.initialised) {' for o in function_tables: print ' %s_init();' % (functionnameify(o[0])) pass print ' gimp_composite_options.initialised = 1;' print ' }' print '}' pass | 73af860ff4a9ad2d64dbee32023a1ec49e63a340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/73af860ff4a9ad2d64dbee32023a1ec49e63a340/make-gimp-composite-dispatch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
14532,
67,
27676,
67,
2738,
12,
915,
67,
9373,
4672,
364,
320,
316,
445,
67,
9373,
30,
1172,
296,
338,
798,
918,
738,
87,
67,
2738,
1435,
4359,
738,
261,
915,
529,
1164,
12,
83,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
314,
14532,
67,
27676,
67,
2738,
12,
915,
67,
9373,
4672,
364,
320,
316,
445,
67,
9373,
30,
1172,
296,
338,
798,
918,
738,
87,
67,
2738,
1435,
4359,
738,
261,
915,
529,
1164,
12,
83,... |
typeMap= { types.BufferType: adBinary, types.FloatType: adNumeric, types.IntType: adInteger, types.LongType: adBigInt, types.StringType: adBSTR, types.NoneType: adEmpty, types.UnicodeType: adBSTR, types.BooleanType:adBoolean, type(decimal.Decimal): adNumeric, } | def __cmp__(self,other): if other in self.values: return 0 if other < self.values: return 1 else: return -1 | 59f15f5710dd451b33216701b567320d565acaf4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1254/59f15f5710dd451b33216701b567320d565acaf4/adodb_django.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
3011,
4672,
309,
1308,
316,
365,
18,
2372,
30,
327,
374,
309,
1308,
411,
365,
18,
2372,
30,
327,
404,
469,
30,
327,
300,
21,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
9625,
972,
12,
2890,
16,
3011,
4672,
309,
1308,
316,
365,
18,
2372,
30,
327,
374,
309,
1308,
411,
365,
18,
2372,
30,
327,
404,
469,
30,
327,
300,
21,
2,
-100,
-100,
-100,
-100,... | |
class peak_search_parameters: | class peak_search_parameters(object): | def peak_search(self, parameters, map, verify_symmetry=True): if (verify_symmetry): assert self._tags.verify(map) if (map.accessor().is_padded()): map = copy(map, flex.grid(map.focus())) grid_peaks = peak_list( data=map, tags=self._tags.tag_array(), peak_search_level=parameters.peak_search_level(), max_peaks=parameters.max_peaks(), peak_cutoff=parameters.peak_cutoff(), interpolate=parameters.interpolate()) if (parameters.min_distance_sym_equiv() is None): return grid_peaks return peak_cluster_analysis( peak_list=grid_peaks, special_position_settings=crystal.special_position_settings( crystal_symmetry=self.crystal_symmetry(), min_distance_sym_equiv=parameters.min_distance_sym_equiv()), general_positions_only=parameters.general_positions_only(), effective_resolution=parameters.effective_resolution(), significant_height_fraction=parameters.significant_height_fraction(), cluster_height_fraction=parameters.cluster_height_fraction(), min_cross_distance=parameters.min_cross_distance(), max_clusters=parameters.max_clusters()) | ed78df3c3e87d1956280dc63a4d5c3c611ebdd97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/ed78df3c3e87d1956280dc63a4d5c3c611ebdd97/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11148,
67,
3072,
12,
2890,
16,
1472,
16,
852,
16,
3929,
67,
8117,
18042,
33,
5510,
4672,
309,
261,
8705,
67,
8117,
18042,
4672,
1815,
365,
6315,
4156,
18,
8705,
12,
1458,
13,
309,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11148,
67,
3072,
12,
2890,
16,
1472,
16,
852,
16,
3929,
67,
8117,
18042,
33,
5510,
4672,
309,
261,
8705,
67,
8117,
18042,
4672,
1815,
365,
6315,
4156,
18,
8705,
12,
1458,
13,
309,
261,... |
self.apply_config(self.config1) | self.apply_config(config) | def test_config1_ok(self): # A config file defining a sub-parser as well. with captured_stdout() as output: self.apply_config(self.config1) logger = logging.getLogger("compiler.parser") # Both will output a message logger.info(self.next_message()) logger.error(self.next_message()) self.assert_log_lines([ ('INFO', '1'), ('ERROR', '2'), ], stream=output) # Original logger output is empty. self.assert_log_lines([]) | 70fdc95b96d1a756b214867339c0475211d0d6d6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/70fdc95b96d1a756b214867339c0475211d0d6d6/test_logging.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
1425,
21,
67,
601,
12,
2890,
4672,
468,
432,
642,
585,
9364,
279,
720,
17,
4288,
487,
5492,
18,
598,
19550,
67,
10283,
1435,
487,
876,
30,
365,
18,
9010,
67,
1425,
12,
1425... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1425,
21,
67,
601,
12,
2890,
4672,
468,
432,
642,
585,
9364,
279,
720,
17,
4288,
487,
5492,
18,
598,
19550,
67,
10283,
1435,
487,
876,
30,
365,
18,
9010,
67,
1425,
12,
1425... |
def pi(self): if self.sequence[0] in pKnterminal.keys(): Nterm = pKnterminal[self.sequence[0]] else: Nterm = 0 if self.sequence[-1] in pKcterminal.keys(): Cterm = pKcterminal[self.sequence[-1]] else: Cterm = 0 pH = 7.0 CutBy = 3.5 Charge = self._chargeR(pH, Cterm, Nterm) | def pi(self): pos_pKs = dict(positive_pKs) neg_pKs = dict(negative_pKs) nterm = self.sequence[0] cterm = self.sequence[-1] if nterm in pKnterminal.keys(): pos_pKs['Nterm'] = pKnterminal[nterm] if cterm in pKcterminal.keys(): neg_pKs['Cterm'] = pKcterminal[cterm] | def pi(self): if self.sequence[0] in pKnterminal.keys(): Nterm = pKnterminal[self.sequence[0]] else: Nterm = 0 if self.sequence[-1] in pKcterminal.keys(): Cterm = pKcterminal[self.sequence[-1]] else: Cterm = 0 pH = 7.0 CutBy = 3.5 Charge = self._chargeR(pH, Cterm, Nterm) | ebf9a9c36ce00ce4a0f66c3a0084ddd85034ff32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/ebf9a9c36ce00ce4a0f66c3a0084ddd85034ff32/IsoelectricPoint.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4790,
12,
2890,
4672,
309,
365,
18,
6178,
63,
20,
65,
316,
293,
47,
82,
15979,
18,
2452,
13332,
423,
6408,
273,
293,
47,
82,
15979,
63,
2890,
18,
6178,
63,
20,
13563,
469,
30,
423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4790,
12,
2890,
4672,
309,
365,
18,
6178,
63,
20,
65,
316,
293,
47,
82,
15979,
18,
2452,
13332,
423,
6408,
273,
293,
47,
82,
15979,
63,
2890,
18,
6178,
63,
20,
13563,
469,
30,
423,
... |
if not (v or l): logging = Fkout() return if isinstance(logging, Fkout): import logging elif reset: reload(logging) logging.basicConfig(level=10, datefmt='%Y%m%d.%H:%M', stream=Fkout()) | if reset: reload(logging) logging.basicConfig(level=10, stream=Fkout()) logging.addLevelName(30, '') | def setLogging(reset=False): global _action, logging if _action == 'daemon': sys.stderr = sys.stdout = Fkout() z = {0:0, 1:50, 2:40, 3:30, 4:20, 5:10} v = z[getConfig()['global']['verbose']] l = z[getConfig()['global']['log']] if not (v or l): logging = Fkout() return if isinstance(logging, Fkout): import logging elif reset: reload(logging) logging.basicConfig(level=10, datefmt='%Y%m%d.%H:%M', stream=Fkout()) if v: logging.getLogger('').addHandler(make_handler2(logging.StreamHandler, '%(levelname)s %(message)s', [max(40,v),50], sys.stderr)) logging.getLogger('').addHandler(make_handler2(logging.StreamHandler, '%(levelname)s %(message)s', [max(v,10),30], sys.stdout)) if l: logging.getLogger('').addHandler(make_handler2(logging.FileHandler, '%(asctime)s %(levelname)-8s %(message)s', [max(l,10),50], getConfig()['global']['logFile'],'a')) | cb06f1645b77b7012f9195d9b9e4a000a0842687 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/cb06f1645b77b7012f9195d9b9e4a000a0842687/rssdler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
7735,
12,
6208,
33,
8381,
4672,
2552,
389,
1128,
16,
2907,
309,
389,
1128,
422,
296,
21511,
4278,
2589,
18,
11241,
273,
2589,
18,
10283,
273,
478,
79,
659,
1435,
998,
273,
288,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
7735,
12,
6208,
33,
8381,
4672,
2552,
389,
1128,
16,
2907,
309,
389,
1128,
422,
296,
21511,
4278,
2589,
18,
11241,
273,
2589,
18,
10283,
273,
478,
79,
659,
1435,
998,
273,
288,
20... |
original_title = str(movie.o_title) title = str(movie.title) | original_title = str(movie.o_title).encode(defaultEnc) title = str(movie.title).encode(defaultEnc) | def export_simple_pdf(self): """exports a simple movie list to a pdf file""" if self.config.get('font', '') != '': self.fontName = 'custom_font' pdfmetrics.registerFont(TTFont(self.fontName, self.config.get('font', ''))) else: self.fontName = "Helvetica" | ceef51b46850fef6c77a10721c98c6376cb6a19e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2687/ceef51b46850fef6c77a10721c98c6376cb6a19e/PluginExportPDF.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3359,
67,
9647,
67,
7699,
12,
2890,
4672,
3536,
23732,
279,
4143,
21360,
666,
358,
279,
8169,
585,
8395,
225,
309,
365,
18,
1425,
18,
588,
2668,
5776,
2187,
28707,
480,
875,
30,
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,
3359,
67,
9647,
67,
7699,
12,
2890,
4672,
3536,
23732,
279,
4143,
21360,
666,
358,
279,
8169,
585,
8395,
225,
309,
365,
18,
1425,
18,
588,
2668,
5776,
2187,
28707,
480,
875,
30,
365,
1... |
try: del self._invalidated[oid] except KeyError: pass | try: del self._invalidated[oid] except KeyError: pass | def setstate(self, object): oid=object._p_oid | 8f44f0fa4dea8b55bb647630f9a0187d2cf2b3c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/8f44f0fa4dea8b55bb647630f9a0187d2cf2b3c9/Connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2019,
12,
2890,
16,
733,
4672,
7764,
33,
1612,
6315,
84,
67,
839,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
2019,
12,
2890,
16,
733,
4672,
7764,
33,
1612,
6315,
84,
67,
839,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
in_ = 'foo\nhey hey $VER\nbar' | in_ = 'foo\nhey hey $VER\nbar\n' | def testReplaceInFile(self): in_ = 'foo\nhey hey $VER\nbar' outf = open('release.replace', 'w') outf.write(in_) outf.close() | 5b1543b87af217f843654018717d0522d3885a6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/5b1543b87af217f843654018717d0522d3885a6a/test_release.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5729,
382,
812,
12,
2890,
4672,
316,
67,
273,
296,
11351,
64,
82,
76,
402,
366,
402,
271,
2204,
64,
82,
3215,
64,
82,
11,
596,
74,
273,
1696,
2668,
9340,
18,
2079,
2187,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
5729,
382,
812,
12,
2890,
4672,
316,
67,
273,
296,
11351,
64,
82,
76,
402,
366,
402,
271,
2204,
64,
82,
3215,
64,
82,
11,
596,
74,
273,
1696,
2668,
9340,
18,
2079,
2187,
296,
... |
if part.getSelectedJigs(): | if part.getSelectedDnaSegments(): | def objectSelected(part, objectFlags = ALLOBJECTS): # Mark 2007-06-24 """ Returns True if anything is selected (i.e. atoms, chunks, jigs, etc.). Returns False if nothing is selected. <objectFlags> is an enum used to test for specific object types, where: ATOMS = 1 CHUNKS = 2 JIGS = 4 DNASTRANDS = 8 DNASEGMENTS = 16 DNAGROUPS = 32 ATOMS | CHUNKS | JIGS | DNASTRANDS | DNASEGMENTS | DNAGROUPS """ if objectFlags & ATOMS: if part.selatoms_list(): return True if objectFlags & CHUNKS: if part.selmols: return True if objectFlags & JIGS: if part.getSelectedJigs(): return True if objectFlags & DNASTRANDS: if part.getSelectedJigs(): return True if objectFlags & DNASEGMENTS: if part.getSelectedJigs(): return True if objectFlags & DNAGROUPS: if part.getSelectedJigs(): return True return False | 298d0953313a4a99b4db9432949f0a721221ff5c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/298d0953313a4a99b4db9432949f0a721221ff5c/ops_select.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
733,
7416,
12,
2680,
16,
733,
5094,
273,
7981,
6038,
5304,
55,
4672,
468,
6622,
4044,
27,
17,
7677,
17,
3247,
3536,
2860,
1053,
309,
6967,
353,
3170,
261,
77,
18,
73,
18,
9006,
16,
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,
733,
7416,
12,
2680,
16,
733,
5094,
273,
7981,
6038,
5304,
55,
4672,
468,
6622,
4044,
27,
17,
7677,
17,
3247,
3536,
2860,
1053,
309,
6967,
353,
3170,
261,
77,
18,
73,
18,
9006,
16,
6... |
print ("a", buddy.props.key) | if (buddy.props.owner): print ("a1", buddy.props.key) else: print ("a2", self.bytes_to_string(buddy.props.key)) | def __init__( self, pca ): self.ca = pca | cb107b8476bf337bf704f6349e5756c4744a0af1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6451/cb107b8476bf337bf704f6349e5756c4744a0af1/mesh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
293,
5353,
262,
30,
365,
18,
5353,
273,
293,
5353,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2738,
972,
12,
365,
16,
293,
5353,
262,
30,
365,
18,
5353,
273,
293,
5353,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
btclock = btclock[0] + 1600 initial_tmstamp = 5000000 | saved_btclock = btclock = btclock[0] btclock += 1600 initial_tmstamp = 100000000 | def test_invalid_set(self, mcl, seq): mcl.test_response = 2 # Set mcl.test_err = True | 3d6ef3bfb1c004998a0f302bb26246bb2558a4b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8028/3d6ef3bfb1c004998a0f302bb26246bb2558a4b9/test2_csp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5387,
67,
542,
12,
2890,
16,
312,
830,
16,
3833,
4672,
312,
830,
18,
3813,
67,
2740,
273,
576,
468,
1000,
312,
830,
18,
3813,
67,
370,
273,
1053,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5387,
67,
542,
12,
2890,
16,
312,
830,
16,
3833,
4672,
312,
830,
18,
3813,
67,
2740,
273,
576,
468,
1000,
312,
830,
18,
3813,
67,
370,
273,
1053,
2,
-100,
-100,
-100,
-100,... |
last_B1 = self.last_params['B1'] | try: last_B1 = self.last_params['B1'] except AttributeError: self.last_params = {} self.last_params['B1'] = 10 last_B1 = 10 | def factor(self, n, factor_digits=None, B1=2000, **kwds): """ Returns a list of all probable prime factors of n, using gmp-ecm. | 874d0b23a3194334e0ad2540ffd0cd36bbaeacf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/874d0b23a3194334e0ad2540ffd0cd36bbaeacf8/ecm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5578,
12,
2890,
16,
290,
16,
5578,
67,
16649,
33,
7036,
16,
605,
21,
33,
17172,
16,
2826,
25577,
4672,
3536,
2860,
279,
666,
434,
777,
3137,
429,
17014,
14490,
434,
290,
16,
1450,
2681... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5578,
12,
2890,
16,
290,
16,
5578,
67,
16649,
33,
7036,
16,
605,
21,
33,
17172,
16,
2826,
25577,
4672,
3536,
2860,
279,
666,
434,
777,
3137,
429,
17014,
14490,
434,
290,
16,
1450,
2681... |
while self.paused: | while self.paused and not self.quit: | def play(self, info): self.info = info while not self.quit: while self.playlist: self.lock.acquire() self.song = self.playlist.pop(0) fn = self.song['filename'] if self.shuffle: random.shuffle(self.playlist) try: self.player = FilePlayer(self.output, fn) except: self.paused = True self.info.missing_song(self.song) self.played.append(self.song) self.lock.release() else: self.info.set_song(self.song, self.player) self.played.append(self.song) self.lock.release() for t in self.player: self.info.set_time(t, self.player.length) while self.paused: time.sleep(0.1) if self.repeat: self.playlist = self.orig_playlist[:] if len(self.played) > 500: del(self.played[500:]) else: if self.song or self.player: self.lock.acquire() self.song = self.player = None self.info.set_song(self.song, self.player) self.paused = True self.lock.release() time.sleep(0.1) | a4e9102cbb1293e10239e7c7866187ddb7ba548d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/a4e9102cbb1293e10239e7c7866187ddb7ba548d/player.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
12,
2890,
16,
1123,
4672,
365,
18,
1376,
273,
1123,
1323,
486,
365,
18,
27176,
30,
1323,
365,
18,
1601,
1098,
30,
365,
18,
739,
18,
1077,
1039,
1435,
365,
18,
816,
75,
273,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6599,
12,
2890,
16,
1123,
4672,
365,
18,
1376,
273,
1123,
1323,
486,
365,
18,
27176,
30,
1323,
365,
18,
1601,
1098,
30,
365,
18,
739,
18,
1077,
1039,
1435,
365,
18,
816,
75,
273,
365... |
def _navbar(self, where, uid=None): | def _navbar(self, where=None, top=0): | def _index_to_html(self): """ @return: An HTML page containing the index terms. @rtype: C{string} """ # Header and navigation bar. str = self._header('Index') str += self._navbar('index') + '<br>\n' | 60b4598f963657af72659f4c3492b6028c51c37e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/60b4598f963657af72659f4c3492b6028c51c37e/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1615,
67,
869,
67,
2620,
12,
2890,
4672,
3536,
632,
2463,
30,
1922,
3982,
1363,
4191,
326,
770,
6548,
18,
632,
86,
723,
30,
385,
95,
1080,
97,
3536,
468,
4304,
471,
10394,
4653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1615,
67,
869,
67,
2620,
12,
2890,
4672,
3536,
632,
2463,
30,
1922,
3982,
1363,
4191,
326,
770,
6548,
18,
632,
86,
723,
30,
385,
95,
1080,
97,
3536,
468,
4304,
471,
10394,
4653,
... |
self.config.WriteInt('DefaultSizeY', sizeY) | self.config.WriteInt('DefaultSizeY', sizeY) WriteInLogWindow("Set default window size to " + str(sizeX) + " x " + str(sizeY) + "\n") def ClearRecentFileList(self): numFiles = self.fileHistory.GetCount() for i in range(numFiles): self.fileHistory.RemoveFileFromHistory(0) | def SetDefaultWindowSize(self, sizeX, sizeY): self.config.SetPath("/WindowSettings") self.config.WriteInt('DefaultSizeX', sizeX) self.config.WriteInt('DefaultSizeY', sizeY) | 787ad9a5975a2417268d38aed76abb08908a9834 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11200/787ad9a5975a2417268d38aed76abb08908a9834/Psycollider.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
1868,
3829,
1225,
12,
2890,
16,
963,
60,
16,
963,
61,
4672,
365,
18,
1425,
18,
694,
743,
2932,
19,
3829,
2628,
7923,
365,
18,
1425,
18,
3067,
1702,
2668,
1868,
1225,
60,
2187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
1868,
3829,
1225,
12,
2890,
16,
963,
60,
16,
963,
61,
4672,
365,
18,
1425,
18,
694,
743,
2932,
19,
3829,
2628,
7923,
365,
18,
1425,
18,
3067,
1702,
2668,
1868,
1225,
60,
2187,
... |
prefs_stylized_toggled, prefs_art_toggled, prefs_playback_toggled, prefs_progress_toggled, prefs_statusbar_toggled, prefs_lyrics_toggled, trayicon_available) | stylized_toggled, art_toggled, playback_toggled, progress_toggled, statusbar_toggled, lyrics_toggled, trayicon_available) | def on_prefs_real(self, parent_window, popuptimes, scrobbler, trayicon_available, trayicon_in_use, reconnect, renotify, reinfofile, prefs_notif_toggled, prefs_stylized_toggled, prefs_art_toggled, prefs_playback_toggled, prefs_progress_toggled, prefs_statusbar_toggled, prefs_lyrics_toggled, prefs_trayicon_toggled, prefs_crossfade_toggled, prefs_crossfade_changed, prefs_window_response, prefs_last_tab, currentoptions_changed, libraryoptions_changed, titleoptions_changed, currsongoptions1_changed, currsongoptions2_changed, ontop_toggled, sticky_toggled, decorated_toggled, infofile_changed): """Display the preferences dialog""" self.window = parent_window self.scrobbler = scrobbler self.reconnect = reconnect self.renotify = renotify self.reinfofile = reinfofile self.last_tab = prefs_last_tab | 7d41f2105c0d58643150b6472b6b9676150f38e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/7d41f2105c0d58643150b6472b6b9676150f38e3/preferences.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
1484,
2556,
67,
7688,
12,
2890,
16,
982,
67,
5668,
16,
1843,
3648,
4485,
16,
888,
303,
9897,
749,
16,
268,
435,
3950,
67,
5699,
16,
268,
435,
3950,
67,
267,
67,
1202,
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,
603,
67,
1484,
2556,
67,
7688,
12,
2890,
16,
982,
67,
5668,
16,
1843,
3648,
4485,
16,
888,
303,
9897,
749,
16,
268,
435,
3950,
67,
5699,
16,
268,
435,
3950,
67,
267,
67,
1202,
16,
... |
Return the (unique) field of all contiued fractions. | Return the (unique) field of all continued fractions. | def ContinuedFractionField(): """ Return the (unique) field of all contiued fractions. EXAMPLES:: sage: ContinuedFractionField() Field of all continued fractions """ return CFF | 27afa7d7d2558f215295f6039ce9eabe97af8775 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/27afa7d7d2558f215295f6039ce9eabe97af8775/contfrac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1816,
267,
5957,
13724,
974,
13332,
3536,
2000,
326,
261,
6270,
13,
652,
434,
777,
17545,
5957,
8330,
87,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
1816,
267,
5957,
13724,
974... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1816,
267,
5957,
13724,
974,
13332,
3536,
2000,
326,
261,
6270,
13,
652,
434,
777,
17545,
5957,
8330,
87,
18,
225,
5675,
8900,
11386,
2866,
225,
272,
410,
30,
1816,
267,
5957,
13724,
974... |
result['ParameterNames'] = self.TRANSPARAMS | result['ParameterNames'] = copy.copy(self.TRANSPARAMS) | def getTransformations(self,condDict={},older=None, newer=None, timeStamp='CreationDate', orderAttribute=None, limit=None, extraParams=False,connection=False): """ Get parameters of all the Transformations with support for the web standard structure """ connection = self.__getConnection(connection) req = "SELECT %s FROM Transformations %s" % (intListToString(self.TRANSPARAMS),self.buildCondition(condDict, older, newer, timeStamp,orderAttribute,limit)) res = self._query(req,connection) if not res['OK']: return res webList = [] resultList = [] for row in res['Value']: # Prepare the structure for the web rList = [] transDict = {} count = 0 for item in row: transDict[self.TRANSPARAMS[count]] = item count += 1 if type(item) not in [IntType,LongType]: rList.append(str(item)) else: rList.append(item) webList.append(rList) if extraParams: res = self.__getAdditionalParameters(transDict['TransformationID'],connection=connection) if not res['OK']: return res transDict.update(res['Value']) resultList.append(transDict) result = S_OK(resultList) result['Records'] = webList result['ParameterNames'] = self.TRANSPARAMS return result | 3b150c9674387b7b9f903a8cf589ad52025410d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3b150c9674387b7b9f903a8cf589ad52025410d0/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4059,
1012,
12,
2890,
16,
10013,
5014,
28793,
1498,
33,
7036,
16,
16069,
33,
7036,
16,
18198,
2218,
9906,
1626,
2187,
1353,
1499,
33,
7036,
16,
1800,
33,
7036,
16,
2870,
1370,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
4059,
1012,
12,
2890,
16,
10013,
5014,
28793,
1498,
33,
7036,
16,
16069,
33,
7036,
16,
18198,
2218,
9906,
1626,
2187,
1353,
1499,
33,
7036,
16,
1800,
33,
7036,
16,
2870,
1370,
33,
... |
self._element_class = sage.modules.real_double_vector.RealDoubleVectorSpaceElement | def __init__(self,n): FreeModule_ambient_field.__init__(self,sage.rings.real_double.RDF,n) self._element_class = sage.modules.real_double_vector.RealDoubleVectorSpaceElement | 6a9600050e5e7d46ee16ab5da9549aefb3c74ba0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/6a9600050e5e7d46ee16ab5da9549aefb3c74ba0/free_module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
82,
4672,
15217,
3120,
67,
2536,
1979,
67,
1518,
16186,
2738,
972,
12,
2890,
16,
87,
410,
18,
86,
899,
18,
7688,
67,
9056,
18,
30137,
16,
82,
13,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
82,
4672,
15217,
3120,
67,
2536,
1979,
67,
1518,
16186,
2738,
972,
12,
2890,
16,
87,
410,
18,
86,
899,
18,
7688,
67,
9056,
18,
30137,
16,
82,
13,
365,
... | |
import cStringIO | import io | def str_of_str_subclass(): import binascii import cStringIO if verbose: print("Testing __str__ defined in subclass of str ...") class octetstring(str): def __str__(self): return binascii.b2a_hex(self) def __repr__(self): return self + " repr" o = octetstring('A') vereq(type(o), octetstring) vereq(type(str(o)), str) vereq(type(repr(o)), str) vereq(ord(o), 0x41) vereq(str(o), '41') vereq(repr(o), 'A repr') vereq(o.__str__(), '41') vereq(o.__repr__(), 'A repr') capture = cStringIO.StringIO() # Calling str() or not exercises different internal paths. print(o, file=capture) print(str(o), file=capture) vereq(capture.getvalue(), '41\n41\n') capture.close() | 2a23ce2dfe8fd81cb39612d526b5e7e2e38b2f2d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/2a23ce2dfe8fd81cb39612d526b5e7e2e38b2f2d/test_descr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
609,
67,
792,
67,
701,
67,
10678,
13332,
1930,
28222,
1930,
2527,
225,
309,
3988,
30,
1172,
2932,
22218,
1001,
701,
972,
2553,
316,
10177,
434,
609,
1372,
7923,
225,
667,
22309,
1080,
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,
609,
67,
792,
67,
701,
67,
10678,
13332,
1930,
28222,
1930,
2527,
225,
309,
3988,
30,
1172,
2932,
22218,
1001,
701,
972,
2553,
316,
10177,
434,
609,
1372,
7923,
225,
667,
22309,
1080,
12... |
self.fail("a *= 2**16 didn't raise MemoryError") | self.fail("Array of size > maxsize created - MemoryError expected") | def test_alloc_overflow(self): a = array.array('d', [-1]*65536) try: a *= 65536 except MemoryError: pass else: self.fail("a *= 2**16 didn't raise MemoryError") b = array.array('d', [ 2.71828183, 3.14159265, -1]) try: b * 1431655766 except MemoryError: pass else: self.fail("a * 1431655766 didn't raise MemoryError") | c5327ae32af9c711e00448582d178ccb7aabffd5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/c5327ae32af9c711e00448582d178ccb7aabffd5/test_array.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9853,
67,
11512,
12,
2890,
4672,
279,
273,
526,
18,
1126,
2668,
72,
2187,
23059,
21,
5772,
26,
2539,
5718,
13,
775,
30,
279,
6413,
28652,
1335,
9251,
668,
30,
1342,
469,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9853,
67,
11512,
12,
2890,
4672,
279,
273,
526,
18,
1126,
2668,
72,
2187,
23059,
21,
5772,
26,
2539,
5718,
13,
775,
30,
279,
6413,
28652,
1335,
9251,
668,
30,
1342,
469,
30,
... |
if flag == _obs_without_name: | if flag == WITHOUT_NAME: | def notify_property_value_change(self, prop_name, old, new): """ Send a notification to all registered observers. | 38d0536eb2a0348732b53a55ef6eecc08bd51e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4095/38d0536eb2a0348732b53a55ef6eecc08bd51e12/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5066,
67,
4468,
67,
1132,
67,
3427,
12,
2890,
16,
2270,
67,
529,
16,
1592,
16,
394,
4672,
3536,
2479,
279,
3851,
358,
777,
4104,
19813,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
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,
5066,
67,
4468,
67,
1132,
67,
3427,
12,
2890,
16,
2270,
67,
529,
16,
1592,
16,
394,
4672,
3536,
2479,
279,
3851,
358,
777,
4104,
19813,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
markup_a = escape(old).splitlines() markup_b = escape(new).splitlines() | markup_a = escape(old).split("\n") markup_b = escape(new).split("\n") | def apply_pygments(data, filename): # XXX Guessing is preferable but really slow, especially on XML # files. #if filename.endswith(".xml"): lexer = get_lexer_for_filename(filename, stripnl=False) #else: # lexer = guess_lexer_for_filename(filename, data, stripnl=False) | f45332236629730085d02ea17786480dcbb2dcb9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1600/f45332236629730085d02ea17786480dcbb2dcb9/diffutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
2074,
75,
1346,
12,
892,
16,
1544,
4672,
468,
11329,
30282,
310,
353,
13256,
429,
1496,
8654,
11816,
16,
29440,
603,
3167,
468,
377,
1390,
18,
468,
430,
1544,
18,
5839,
1918,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2230,
67,
2074,
75,
1346,
12,
892,
16,
1544,
4672,
468,
11329,
30282,
310,
353,
13256,
429,
1496,
8654,
11816,
16,
29440,
603,
3167,
468,
377,
1390,
18,
468,
430,
1544,
18,
5839,
1918,
... |
self._ent_handler.resolveEntity(publicId, systemId) | return self._ent_handler.resolveEntity(publicId, systemId) | def resolveEntity(self, publicId, systemId): self._ent_handler.resolveEntity(publicId, systemId) | e0de55526fd6afdce562f4653bea4b7f3f45e09f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e0de55526fd6afdce562f4653bea4b7f3f45e09f/saxutils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2245,
1943,
12,
2890,
16,
1071,
548,
16,
30083,
4672,
365,
6315,
319,
67,
4176,
18,
10828,
1943,
12,
482,
548,
16,
30083,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2245,
1943,
12,
2890,
16,
1071,
548,
16,
30083,
4672,
365,
6315,
319,
67,
4176,
18,
10828,
1943,
12,
482,
548,
16,
30083,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
def test_debuglevel(self): | def test_debuglevel_reads(self): | def test_debuglevel(self): # test all the various places that self.msg(...) is called given_a_expect_b = [ # Telnet.fill_rawq (b'a', ": recv b''\n"), # Telnet.process_rawq (tl.IAC + bytes([88]), ": IAC 88 not recognized\n"), (tl.IAC + tl.DO + bytes([1]), ": IAC DO 1\n"), (tl.IAC + tl.DONT + bytes([1]), ": IAC DONT 1\n"), (tl.IAC + tl.WILL + bytes([1]), ": IAC WILL 1\n"), (tl.IAC + tl.WONT + bytes([1]), ": IAC WONT 1\n"), # Telnet.write # XXX, untested ] for a, b in given_a_expect_b: self._test_debuglevel([a, EOF_sigil], b) return | e5442ce52d8b7efc098b2e1b8e4f775745f70c30 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/e5442ce52d8b7efc098b2e1b8e4f775745f70c30/test_telnetlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
4148,
2815,
67,
11904,
12,
2890,
4672,
468,
1842,
777,
326,
11191,
12576,
716,
365,
18,
3576,
5825,
13,
353,
2566,
864,
67,
69,
67,
12339,
67,
70,
273,
306,
468,
399,
292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4148,
2815,
67,
11904,
12,
2890,
4672,
468,
1842,
777,
326,
11191,
12576,
716,
365,
18,
3576,
5825,
13,
353,
2566,
864,
67,
69,
67,
12339,
67,
70,
273,
306,
468,
399,
292,
... |
force_update_f_mask = False, | force_update_f_mask = True, | def update_xray_structure(self, xray_structure = None, update_f_calc = False, update_f_mask = False, update_f_ordered_solvent = False, force_update_f_mask = False, out = None, k_sol = None, b_sol = None, b_cart = None): consider_mask_update = None set_core_flag =True if xray_structure is not None: self.xray_structure = xray_structure | 5be1688480ae84cbec806fb56576b6e1cb83dd3d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/5be1688480ae84cbec806fb56576b6e1cb83dd3d/twin_f_model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
67,
92,
435,
67,
7627,
12,
2890,
16,
619,
435,
67,
7627,
6647,
273,
599,
16,
1089,
67,
74,
67,
12448,
5411,
273,
1083,
16,
1089,
67,
74,
67,
4455,
5411,
273,
1083,
16,
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,
1089,
67,
92,
435,
67,
7627,
12,
2890,
16,
619,
435,
67,
7627,
6647,
273,
599,
16,
1089,
67,
74,
67,
12448,
5411,
273,
1083,
16,
1089,
67,
74,
67,
4455,
5411,
273,
1083,
16,
1089,
... |
xoff = xoff * width | xoff_mul = width else: xoff_mul = 1 | def place(self, dest, x, y, width, height, surf, xoff=None, yoff=None, main=True): """ This draws this Displayable onto a destination surface, using the placement style information returned by this object's get_placement() method. | 5efc4373846ea8b891c987e4bdc188883a0221e1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10962/5efc4373846ea8b891c987e4bdc188883a0221e1/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3166,
12,
2890,
16,
1570,
16,
619,
16,
677,
16,
1835,
16,
2072,
16,
22253,
16,
619,
3674,
33,
7036,
16,
677,
3674,
33,
7036,
16,
2774,
33,
5510,
4672,
3536,
1220,
30013,
333,
9311,
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,
3166,
12,
2890,
16,
1570,
16,
619,
16,
677,
16,
1835,
16,
2072,
16,
22253,
16,
619,
3674,
33,
7036,
16,
677,
3674,
33,
7036,
16,
2774,
33,
5510,
4672,
3536,
1220,
30013,
333,
9311,
4... |
def visit_func(node): | def visit_func(self, node): | def visit_func(node): self.wiki_text = '' self.request.write(moin_callable(1)) self.body.append(self.wiki_text) | 140a51a76919d72931a4f49d46229d9f62125389 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/140a51a76919d72931a4f49d46229d9f62125389/rst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
644,
12,
2890,
16,
756,
4672,
365,
18,
13044,
67,
955,
273,
875,
365,
18,
2293,
18,
2626,
12,
81,
885,
67,
7293,
12,
21,
3719,
365,
18,
3432,
18,
6923,
12,
2890,
18,
1304... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
644,
12,
2890,
16,
756,
4672,
365,
18,
13044,
67,
955,
273,
875,
365,
18,
2293,
18,
2626,
12,
81,
885,
67,
7293,
12,
21,
3719,
365,
18,
3432,
18,
6923,
12,
2890,
18,
1304... |
if self.cmode: | if self.error: pass elif self.cmode: | def character_data (self, data): """handle rule of folder character data""" if self.cmode: if self.rule is None: self.folder.fill_data(data, self.cmode) else: self.rule.fill_data(data, self.cmode) | 90bab963a782a3081df5cfdb4c9d1570377d8b73 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/90bab963a782a3081df5cfdb4c9d1570377d8b73/configuration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3351,
67,
892,
261,
2890,
16,
501,
4672,
3536,
4110,
1720,
434,
3009,
3351,
501,
8395,
309,
365,
18,
1636,
30,
1342,
1327,
365,
18,
71,
3188,
30,
309,
365,
18,
5345,
353,
599,
30,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3351,
67,
892,
261,
2890,
16,
501,
4672,
3536,
4110,
1720,
434,
3009,
3351,
501,
8395,
309,
365,
18,
1636,
30,
1342,
1327,
365,
18,
71,
3188,
30,
309,
365,
18,
5345,
353,
599,
30,
36... |
debug("size: %d, flags % | def __parse_tag(self, tag, count): f = StringIO(tag) | 6666dcf7f5e5406d88f110933303ca37afecc2ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/6666dcf7f5e5406d88f110933303ca37afecc2ac/apev2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2670,
67,
2692,
12,
2890,
16,
1047,
16,
1056,
4672,
284,
273,
15777,
12,
2692,
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,
... | [
1,
1,
1,
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,
1001,
2670,
67,
2692,
12,
2890,
16,
1047,
16,
1056,
4672,
284,
273,
15777,
12,
2692,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
errmsg = 'Area change should contain: \n'\ ' timestep, relative area change' | errmsg = 'Area change should contain:\n timestep, relative area change' | def _set_area_change(self, data): errmsg = 'Area change should contain: \n'\ ' timestep, relative area change' for vals in data: if len(vals)==2: obj = AreaChange(timestep=int(vals[0]), rel_change=vals[1]) self.area_change.append(obj) elif vals!=[]: error(errmsg, title='error reading data', buttons=['OK']) break | 6758e99951ce0692b8c2bd48902efe5793c942a1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1832/6758e99951ce0692b8c2bd48902efe5793c942a1/yasso.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
5036,
67,
3427,
12,
2890,
16,
501,
4672,
17460,
273,
296,
5484,
2549,
1410,
912,
5581,
82,
225,
27072,
16,
3632,
5091,
2549,
11,
364,
5773,
316,
501,
30,
309,
562,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
5036,
67,
3427,
12,
2890,
16,
501,
4672,
17460,
273,
296,
5484,
2549,
1410,
912,
5581,
82,
225,
27072,
16,
3632,
5091,
2549,
11,
364,
5773,
316,
501,
30,
309,
562,
12,
... |
return pythoncom.WrapObject(policy.DefaultPolicy(cls(seq)), pythoncom.IID_IEnumVARIANT, pythoncom.IID_IEnumVARIANT) | ob = cls(seq, iid=iid) return wrap(ob, iid, usePolicy=usePolicy, useDispatcher=useDispatcher) | def NewEnum(seq, cls=ListEnumerator): """Creates a new enumerator COM server. This function creates a new COM Server that implements the IID_IEnumVARIANT interface. A COM server that can enumerate the passed in sequence will be created, then wrapped up for return through the COM framework. Optionally, a custom COM server for enumeration can be passed (the default is @ListEnumerator@). """ return pythoncom.WrapObject(policy.DefaultPolicy(cls(seq)), pythoncom.IID_IEnumVARIANT, pythoncom.IID_IEnumVARIANT) | 78f14f714bfffd4019f0a4f80737fccbb4eda154 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/78f14f714bfffd4019f0a4f80737fccbb4eda154/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1166,
3572,
12,
5436,
16,
2028,
33,
682,
3572,
7385,
4672,
3536,
2729,
279,
394,
24679,
5423,
1438,
18,
225,
1220,
445,
3414,
279,
394,
5423,
3224,
716,
4792,
326,
467,
734,
67,
45,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1166,
3572,
12,
5436,
16,
2028,
33,
682,
3572,
7385,
4672,
3536,
2729,
279,
394,
24679,
5423,
1438,
18,
225,
1220,
445,
3414,
279,
394,
5423,
3224,
716,
4792,
326,
467,
734,
67,
45,
35... |
print >> sys.stderr, \ 'Usage: python 3rdparty_download.py TARGET_OS TARBALLS_DIR' | print >> sys.stderr, ( 'Usage: python 3rdparty_download.py ' 'TARGET_OS TARBALLS_DIR SOURCES_DIR PATCHES_DIR' ) | def main(platform, tarballsDir): if not isdir(tarballsDir): print >> sys.stderr, \ 'Output directory "%s" does not exist' % tarballsDir sys.exit(2) configuration = getConfiguration('3RD_STA') # Compute the set of all directly and indirectly required libraries. transLibs = set() for makeName in requiredLibrariesFor(configuration.iterDesiredComponents()): library = librariesByName[makeName] transLibs.add(makeName) for depMakeName in library.dependsOn: transLibs.add(depMakeName) # Filter out system libraries. thirdPartyLibs = set( makeName for makeName in transLibs if not librariesByName[makeName].isSystemLibrary(platform) ) for makeName in sorted(thirdPartyLibs): package = getPackage(makeName) downloadPackage(package, tarballsDir) | c8218e3e1a003e2fb02005eff7820f059a70bbf3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5450/c8218e3e1a003e2fb02005eff7820f059a70bbf3/3rdparty_download.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
9898,
16,
29441,
87,
1621,
4672,
309,
486,
9783,
12,
88,
23846,
87,
1621,
4672,
1172,
1671,
2589,
18,
11241,
16,
521,
296,
1447,
1867,
2213,
87,
6,
1552,
486,
1005,
11,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
9898,
16,
29441,
87,
1621,
4672,
309,
486,
9783,
12,
88,
23846,
87,
1621,
4672,
1172,
1671,
2589,
18,
11241,
16,
521,
296,
1447,
1867,
2213,
87,
6,
1552,
486,
1005,
11,
738,
... |
markeredgewidth=1, linewidth = 1, label = plot_name, \ | markeredgewidth=1, linewidth = 2, label = plot_name, \ | def efficiencyplot(found, missed, col_name, ifo=None, plot_type = 'linear', \ nbins = 40, output_name = None, plotsym = 'k-', plot_name = '', \ title_string = '', errors = False): """ function to plot the difference if col_name_a in two tables against the value of col_name_b in table1. @param found: metaDataTable containing found injections @param missed: metaDataTable containing missed injections @param col_name: name of column used to plot efficiency @param ifo: name of ifo (default = None), used in extracting information (e.g. which eff_dist) @param plot_type: either 'linear' or 'log' plot on x-axis @param plot_sym: the symbol to use when plotting, default = 'k-' @param plot_name: name of the plot (for the legend) @param title_string: extra info for title @param errorbars: plot errorbars on the efficiencies (using binomial errors) default = False """ if not ifo and found.table[0].has_key('ifo'): ifo = found.table[0]["ifo"] foundVal = readcol(found,col_name, ifo) missedVal = readcol(missed,col_name, ifo) if plot_type == 'log': foundVal = log10(foundVal) missedVal = log10(missedVal) step = (max(foundVal) - min(foundVal)) /nbins bins = arange(min(foundVal),max(foundVal), step ) fig_num = gcf().number figure(100) [num_found,binsf,stuff] = hist(foundVal, bins) [num_missed,binsm,stuff] = hist(missedVal ,bins) close(100) figure(fig_num) num_found = array(num_found,'d') eff = num_found / (num_found + num_missed) error = sqrt( num_found * num_missed / (num_found + num_missed)**3 ) error = array(error) if plot_type == 'log': bins = 10**bins if plot_name: semilogx(bins, eff, plotsym,markersize=12, markerfacecolor=None,\ markeredgewidth=1, linewidth=1, label = plot_name) else: semilogx(bins, eff, plotsym,markersize=12, markerfacecolor=None,\ markeredgewidth=1, linewidth=1) if errors: errorbar(bins, eff, error,markersize=12, markerfacecolor=None,\ markeredgewidth=1, linewidth = 1, label = plot_name, \ fmt = plotsym) else: if errors: errorbar(bins, eff, error, fmt = plotsym, markersize=12,\ markerfacecolor=None,\ markeredgewidth=1, linewidth=1, label = plot_name) else: plot(bins, eff, plotsym,markersize=12, markerfacecolor=None,\ markeredgewidth=1, linewidth=1, label = plot_name) xlabel(col_name, size='x-large') ylabel('Efficiency', size='x-large') ylim(0,1.1) if ifo: title_string += ' ' + ifo title_string += ' ' + col_name title_string += ' efficiency plot' title(title_string, size='x-large') grid(True) if output_name: if ifo: output_name += '_' + ifo output_name += '_' + col_name + '_eff.png' savefig(output_name) | affb316c0daa1829fd1626538e6be2e111fe5b01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/affb316c0daa1829fd1626538e6be2e111fe5b01/viz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30325,
4032,
12,
7015,
16,
25143,
16,
645,
67,
529,
16,
21479,
33,
7036,
16,
3207,
67,
723,
273,
296,
12379,
2187,
521,
4264,
2679,
273,
8063,
16,
876,
67,
529,
273,
599,
16,
3207,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30325,
4032,
12,
7015,
16,
25143,
16,
645,
67,
529,
16,
21479,
33,
7036,
16,
3207,
67,
723,
273,
296,
12379,
2187,
521,
4264,
2679,
273,
8063,
16,
876,
67,
529,
273,
599,
16,
3207,
8... |
str += '<A NAME="'+vname+'">\n' | str += '<A NAME="'+vname+'"/>\n' | def _var_details(self, variables, heading='Variable Details'): """## Return a detailed description of the variables in a class or module.""" variables = self._sort(variables) if len(variables) == 0: return '' str = self._table_header(heading)+'</TABLE>' | 07991a6224980123acb6be68dd2d39634e5ac591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/07991a6224980123acb6be68dd2d39634e5ac591/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1401,
67,
6395,
12,
2890,
16,
3152,
16,
11053,
2218,
3092,
21897,
11,
4672,
3536,
1189,
2000,
279,
6864,
2477,
434,
326,
3152,
316,
279,
667,
578,
1605,
12123,
3152,
273,
365,
6315,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1401,
67,
6395,
12,
2890,
16,
3152,
16,
11053,
2218,
3092,
21897,
11,
4672,
3536,
1189,
2000,
279,
6864,
2477,
434,
326,
3152,
316,
279,
667,
578,
1605,
12123,
3152,
273,
365,
6315,... |
for item in self.attachments: if item['filename'] == '' and item['subtype'] != 'html': return unicode(item['payload'], self.encoding, 'ignore') html_body = self.html_body if html_body: plain_body = convertHTML2Text(str(html_body)) return unicode(plain_body, self.encoding, 'ignore') return '' | if self.__body == None: self.__body = u'' for item in self.attachments: if item['filename'] == '' and item['subtype'] != 'html': retval = item self.__body = unicode(item['payload'], self.encoding, 'ignore') break html_body = self.html_body if html_body and (not self.__body): plain_body = convertHTML2Text(str(html_body)) self.__body = unicode(plain_body, self.encoding, 'ignore') assert self.__body != None assert type(self.__body) == unicode return self.__body | def body(self): for item in self.attachments: if item['filename'] == '' and item['subtype'] != 'html': return unicode(item['payload'], self.encoding, 'ignore') html_body = self.html_body if html_body: plain_body = convertHTML2Text(str(html_body)) return unicode(plain_body, self.encoding, 'ignore') return '' | 2b42a375ab21024348f8d6138029ca006d793e1f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6274/2b42a375ab21024348f8d6138029ca006d793e1f/emailmessage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1417,
12,
2890,
4672,
364,
761,
316,
365,
18,
17828,
30,
309,
761,
3292,
3459,
3546,
422,
875,
471,
761,
3292,
21974,
3546,
480,
296,
2620,
4278,
327,
5252,
12,
1726,
3292,
7648,
17337,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1417,
12,
2890,
4672,
364,
761,
316,
365,
18,
17828,
30,
309,
761,
3292,
3459,
3546,
422,
875,
471,
761,
3292,
21974,
3546,
480,
296,
2620,
4278,
327,
5252,
12,
1726,
3292,
7648,
17337,
... |
print "Usage: timecopy.py [-hnv] <source> <target>" | print "Usage: timecopy.py [-hnv] [--nochown] <source> <target>" | def usage(): print "Usage: timecopy.py [-hnv] <source> <target>" print "" print "Copies a Mac OS X Time Machine volume (set of backups) from one location" print "to another, such as from one disk to another, or from one disk image to" print "another. This can be useful when block copying the disk is not feasible" print "(i.e. the destination disk is smaller than the original)." print "" print "The <source> location must be the root directory of the source Time" print "Machine volume, that which contains the 'Backups.backupdb' directory" print "(e.g. /Volumes/Backup, not /Volumes/Backup/Backups.backupdb/gojira)." print "You must have sufficient privileges to access this directory, and the" print "Time Machine volume must already be mounted (read-only mode is okay)." print "" print "The <target> location should be the root of an empty volume to which the" print "Time Machine backups will be copied. You must have sufficient privileges" print "to write to this location. Chances are you will need to be using `sudo`" print "to gain the necessary privileges, unless -n or --dry-run is given." print "" print "-h|--help" print "\tPrints this usage information." print "" print "-n|--dry-run" print "\tDo not make any changes on disk." print "" print "-v|--verbose" print "\tPrints information about what the script is doing at each step." | 49fd5edac5f277d9462e3515d4fbc728abe96be9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6391/49fd5edac5f277d9462e3515d4fbc728abe96be9/timecopy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
315,
5357,
30,
813,
3530,
18,
2074,
23059,
76,
16588,
65,
306,
413,
2135,
343,
995,
65,
411,
3168,
34,
411,
3299,
2984,
1172,
1408,
1172,
315,
15670,
279,
13217,
5932,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4084,
13332,
1172,
315,
5357,
30,
813,
3530,
18,
2074,
23059,
76,
16588,
65,
306,
413,
2135,
343,
995,
65,
411,
3168,
34,
411,
3299,
2984,
1172,
1408,
1172,
315,
15670,
279,
13217,
5932,... |
print 'Setting: ' + paramName + ' to ' + node.GetName() | print 'Setting: ' + paramName + ' to ' + node.GetID() | def Execute ( self, *args, **keywords ): self.module = slicer.MRMLScene.CreateNodeByClass("vtkMRMLCommandLineModuleNode") self.module.SetModuleDescription(self.name) pargs = self.__FindPositionalArguments() diff = len(pargs) - len(args) if diff < 0: self.module = None raise Exception ( "Plugin: " + self.name + " requires " + str(len(pargs)) + "arguments, " + str(len(args)) + " given" ) | 2b0995649fc67e7781fbd695a8d18eb77ade9432 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12580/2b0995649fc67e7781fbd695a8d18eb77ade9432/Slicer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7903,
261,
365,
16,
380,
1968,
16,
2826,
11771,
262,
30,
365,
18,
2978,
273,
2020,
21349,
18,
23464,
1495,
14370,
18,
1684,
907,
30032,
2932,
11734,
79,
23464,
1495,
21391,
3120,
907,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7903,
261,
365,
16,
380,
1968,
16,
2826,
11771,
262,
30,
365,
18,
2978,
273,
2020,
21349,
18,
23464,
1495,
14370,
18,
1684,
907,
30032,
2932,
11734,
79,
23464,
1495,
21391,
3120,
907,
79... |
elif event.key.keyval == Gdk.Return and event.key.state == Gdk.ModifierType.CONTROL_MASK: | elif event.key.keyval == Gdk.KEY_Return and state & Gdk.ModifierType.CONTROL_MASK: | def __key_press_event_cb(self, view, event): if event.key.keyval == Gdk.d and event.key.state == Gdk.ModifierType.CONTROL_MASK: self.destroy() elif event.key.keyval == Gdk.Return and event.key.state == Gdk.ModifierType.CONTROL_MASK: # Get the command buffer = view.get_buffer() inp_mark = buffer.get_mark("input") inp = buffer.get_iter_at_mark(inp_mark) cur = buffer.get_end_iter() line = buffer.get_text(inp, cur, True) self.current_command = self.current_command + line + "\n" self.history_add(line) | 41bf18408a8155299c0868e65d97739374d59c3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11070/41bf18408a8155299c0868e65d97739374d59c3d/console.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
856,
67,
1028,
67,
2575,
67,
7358,
12,
2890,
16,
1476,
16,
871,
4672,
309,
871,
18,
856,
18,
856,
1125,
422,
611,
2883,
18,
72,
471,
871,
18,
856,
18,
2019,
422,
611,
2883,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
856,
67,
1028,
67,
2575,
67,
7358,
12,
2890,
16,
1476,
16,
871,
4672,
309,
871,
18,
856,
18,
856,
1125,
422,
611,
2883,
18,
72,
471,
871,
18,
856,
18,
2019,
422,
611,
2883,
1... |
get_journal_id(self.journal_name) | get_journal_id(journal_name) | def __call__(self, req, form): """ Maybe resolve the final / of a directory """ ## Support for legacy journal/[empty]?(args*) urls. There are ## these parameters only in that case argd = wash_urlargd(form, {'name': (str, ""), 'issue': (str, ""), 'category': (str, ""), 'ln': (str, CFG_SITE_LANG), 'number': (int, None), 'verbose': (int, 0)} ) | bae57c8d54f081029ed46e6fc1bac54d5858c064 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/bae57c8d54f081029ed46e6fc1bac54d5858c064/webjournal_webinterface.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
1111,
16,
646,
4672,
3536,
14024,
2245,
326,
727,
342,
434,
279,
1867,
3536,
7541,
13619,
364,
8866,
13001,
19,
63,
5531,
26717,
12,
1968,
12437,
6903,
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,
1991,
972,
12,
2890,
16,
1111,
16,
646,
4672,
3536,
14024,
2245,
326,
727,
342,
434,
279,
1867,
3536,
7541,
13619,
364,
8866,
13001,
19,
63,
5531,
26717,
12,
1968,
12437,
6903,
18,... |
this = apply(_quickfix.new_RepurchaseRate, args) | this = _quickfix.new_RepurchaseRate(*args) | def __init__(self, *args): this = apply(_quickfix.new_RepurchaseRate, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
426,
12688,
12104,
4727,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
426,
12688,
12104,
4727,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,... |
if exPipe: | if exPipe is not None: | def compute(self): exPipe = self.forceGetInputFromPort('ExternalPipe') if exPipe: self.setResult('InternalPipe', exPipe) else: self.setResult('InternalPipe', InvalidOutput) | 6fc007c0535d1a760281242526c5194698eecb72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/6fc007c0535d1a760281242526c5194698eecb72/sub_module.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3671,
12,
2890,
4672,
431,
11546,
273,
365,
18,
5734,
967,
1210,
1265,
2617,
2668,
6841,
11546,
6134,
309,
431,
11546,
353,
486,
599,
30,
365,
18,
542,
1253,
2668,
3061,
11546,
2187,
431... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3671,
12,
2890,
4672,
431,
11546,
273,
365,
18,
5734,
967,
1210,
1265,
2617,
2668,
6841,
11546,
6134,
309,
431,
11546,
353,
486,
599,
30,
365,
18,
542,
1253,
2668,
3061,
11546,
2187,
431... |
Returns the degree of self, ie the largest n so that the coefficient of x^n is distinguishable from 0. """ self._normalize() | Returns the degree of self, i.e., the largest $n$ so that the coefficient of $x^n$ does not compare equal to $0$. EXAMPLES: sage: K = Qp(3,10) sage: x = O(3^5) sage: li =[3^i * x for i in range(0,5)]; li [O(3^5), O(3^6), O(3^7), O(3^8), O(3^9)] sage: R.<T> = K[[]] sage: f = R(li); f O(3^5) + O(3^6)*T + O(3^7)*T^2 + O(3^8)*T^3 + O(3^9)*T^4 sage: f.degree() -1 """ self._normalize() | def degree(self): """ Returns the degree of self, ie the largest n so that the coefficient of x^n is distinguishable from 0. """ | 6d41815a84071753859e299280b4834e622b2177 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/6d41815a84071753859e299280b4834e622b2177/polynomial_padic_capped_relative_dense.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10782,
12,
2890,
4672,
3536,
2860,
326,
10782,
434,
365,
16,
9228,
326,
12756,
290,
1427,
716,
326,
16554,
434,
619,
66,
82,
353,
23926,
429,
628,
374,
18,
3536,
2,
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,
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,
10782,
12,
2890,
4672,
3536,
2860,
326,
10782,
434,
365,
16,
9228,
326,
12756,
290,
1427,
716,
326,
16554,
434,
619,
66,
82,
353,
23926,
429,
628,
374,
18,
3536,
2,
-100,
-100,
-100,
-... |
Main() | Main() | def Main(): """ The main point of entry for the checker service. This will set up the DBUS and glib extensions, the gobject/glib main loop, and start the service. """ global log log = Log("rabbitvcs.services.checkerservice:main") log.debug("Checker: starting service: %s (%s)" % (OBJECT_PATH, os.getpid())) # We need this to for the client to be able to do asynchronous calls dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) # The following calls are required to make DBus thread-aware and therefore # support the ability run threads. gobject.threads_init() dbus.glib.threads_init() # This registers our service name with the bus session_bus = dbus.SessionBus() service_name = dbus.service.BusName(SERVICE, session_bus) mainloop = gobject.MainLoop() checker_service = StatusCheckerService(session_bus, mainloop) # import cProfile # import rabbitvcs.lib.helper # profile_data_file = os.path.join( # rabbitvcs.lib.helper.get_home_folder(), # "rvcs_checker.stats") # cProfile.run("mainloop.run()", profile_data_file) glib.idle_add(sys.stdout.write, "Started status checker service\n") glib.idle_add(sys.stdout.flush) mainloop.run() log.debug("Checker: ended service: %s (%s)" % (OBJECT_PATH, os.getpid())) | 0e4a50b306c62324e6658e5dd495b39e5460a8cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/0e4a50b306c62324e6658e5dd495b39e5460a8cb/checkerservice.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12740,
13332,
3536,
1021,
2774,
1634,
434,
1241,
364,
326,
12489,
1156,
18,
225,
1220,
903,
444,
731,
326,
2383,
3378,
471,
314,
2941,
4418,
16,
326,
314,
1612,
19,
75,
2941,
2774,
2798,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12740,
13332,
3536,
1021,
2774,
1634,
434,
1241,
364,
326,
12489,
1156,
18,
225,
1220,
903,
444,
731,
326,
2383,
3378,
471,
314,
2941,
4418,
16,
326,
314,
1612,
19,
75,
2941,
2774,
2798,... |
registration = portal.portal_registration | registration = getToolByName(self.context, 'portal_registration') | def action_join(self, action, data): | 5e2448fc7580eaa43d1bfcc5e2a88dd61b0204bb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12186/5e2448fc7580eaa43d1bfcc5e2a88dd61b0204bb/joinform.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
5701,
12,
2890,
16,
1301,
16,
501,
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,
1301,
67,
5701,
12,
2890,
16,
1301,
16,
501,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
name = os.path.splitext(os.path.basename(name))[0] | name = os.path.splitext(os.path.basename(os.path.normpath(name)))[0] | def __init__(self, libcode, source, name, args): if os.path.exists(name): name = os.path.splitext(os.path.basename(name))[0] self.source = source self.version = self._get_version(libcode) self.name = name self.orig_name = name # Stores original name also after copying self.args = args self._instance_cache = [] if libcode is not None: self.doc = utils.get_doc(libcode) self.scope = self._get_scope(libcode) self._libcode = libcode self.init = self._create_init_handler(libcode) self._libinst = self.get_instance() self.handlers = self._create_handlers(self._libinst) self.init_scope_handling() | 02505ea406aaf4eada398231967db098fb0623f5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7408/02505ea406aaf4eada398231967db098fb0623f5/testlibraries.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2561,
710,
16,
1084,
16,
508,
16,
833,
4672,
309,
1140,
18,
803,
18,
1808,
12,
529,
4672,
508,
273,
1140,
18,
803,
18,
4939,
408,
12,
538,
18,
803,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2561,
710,
16,
1084,
16,
508,
16,
833,
4672,
309,
1140,
18,
803,
18,
1808,
12,
529,
4672,
508,
273,
1140,
18,
803,
18,
4939,
408,
12,
538,
18,
803,
1... |
self.formatter.end_paragraph(0) | self.formatter.end_paragraph(1) | def end_blockquote(self): self.formatter.end_paragraph(0) self.formatter.pop_margin() | 20b35690ee3c685b26abc9a7ddc1fe028abe1f31 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/20b35690ee3c685b26abc9a7ddc1fe028abe1f31/htmllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
2629,
6889,
12,
2890,
4672,
365,
18,
12354,
18,
409,
67,
22445,
12,
21,
13,
365,
18,
12354,
18,
5120,
67,
10107,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
2629,
6889,
12,
2890,
4672,
365,
18,
12354,
18,
409,
67,
22445,
12,
21,
13,
365,
18,
12354,
18,
5120,
67,
10107,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
for extension in os.listdir("extensions"): pattern = "extensions/%s/*.gaupol-extension.in" % extension | for extension in os.listdir("data/extensions"): pattern = "data/extensions/%s/*.gaupol-extension.in" pattern = pattern % extension | def run(self): """Install data files after translating them.""" if "py2exe" in sys.argv: # Do not try compiling translations on Windows, # instead expect them to have been precompiled. return install_data.run(self) if self.distribution.with_aeidon: for po_file in glob.glob("po/*.po"): self.data_files.append(self.__get_mo_file(po_file)) for pattern_file in glob.glob("data/patterns/*.in"): self.data_files.append(self.__get_pattern_file(pattern_file)) if self.distribution.with_gaupol: for extension in os.listdir("extensions"): pattern = "extensions/%s/*.gaupol-extension.in" % extension for extension_file in glob.glob(pattern): t = self.__get_extension_file(extension, extension_file) self.data_files.append(t) self.data_files.append(self.__get_desktop_file()) install_data.run(self) if self.distribution.with_gaupol: self.__build_extensions() | 85f84ae960c090862edef0f0778f9c3a027f4cc4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12852/85f84ae960c090862edef0f0778f9c3a027f4cc4/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
6410,
501,
1390,
1839,
2162,
1776,
2182,
12123,
309,
315,
2074,
22,
14880,
6,
316,
2589,
18,
19485,
30,
468,
2256,
486,
775,
1161,
4973,
7863,
603,
8202,
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,
1086,
12,
2890,
4672,
3536,
6410,
501,
1390,
1839,
2162,
1776,
2182,
12123,
309,
315,
2074,
22,
14880,
6,
316,
2589,
18,
19485,
30,
468,
2256,
486,
775,
1161,
4973,
7863,
603,
8202,
16,
... |
str += ' </dd>\n</dl>\n\n' | str += '</dd></dl>\n' | def _func_details(self, functions, cls, heading='Function Details'): """Return a detailed description of the functions in a class or module.""" functions = self._sort(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</table>' | 493b240e73d87b9805c2fa61669017035e0ae245 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/493b240e73d87b9805c2fa61669017035e0ae245/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
644,
67,
6395,
12,
2890,
16,
4186,
16,
2028,
16,
11053,
2218,
2083,
21897,
11,
4672,
3536,
990,
279,
6864,
2477,
434,
326,
4186,
316,
279,
667,
578,
1605,
12123,
4186,
273,
365,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
644,
67,
6395,
12,
2890,
16,
4186,
16,
2028,
16,
11053,
2218,
2083,
21897,
11,
4672,
3536,
990,
279,
6864,
2477,
434,
326,
4186,
316,
279,
667,
578,
1605,
12123,
4186,
273,
365,
6... |
b = self._s3conn.get_bucket(self._bucket_name) | b = self._s3conn.get_bucket(self._bucket_name, validate=True) | def _s3bukt(self): try: return self._tlocal.s3bukt except AttributeError: try: b = self._s3conn.get_bucket(self._bucket_name) except S3ResponseError, e: if "404 Not Found" not in str(e): raise e b = self._s3conn.create_bucket(self._bucket_name) self._tlocal.s3bukt = b return b | 31f4bb16317ced0f4173d23a40c64f59c72f1f72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5579/31f4bb16317ced0f4173d23a40c64f59c72f1f72/s3fs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
87,
23,
70,
31699,
12,
2890,
4672,
775,
30,
327,
365,
6315,
88,
3729,
18,
87,
23,
70,
31699,
1335,
6394,
30,
775,
30,
324,
273,
365,
6315,
87,
23,
4646,
18,
588,
67,
7242,
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,
389,
87,
23,
70,
31699,
12,
2890,
4672,
775,
30,
327,
365,
6315,
88,
3729,
18,
87,
23,
70,
31699,
1335,
6394,
30,
775,
30,
324,
273,
365,
6315,
87,
23,
4646,
18,
588,
67,
7242,
12,... |
self._input('xyz %s %s %s' % \ site['fractional']) | self.input('xyz %s %s %s' % \ site['fractional']) | def run(self): if not self._hklin: raise RuntimeError, 'no HKLIN set' | cd6e002b2e42050f7b411cb17657d9592baf3d41 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/cd6e002b2e42050f7b411cb17657d9592baf3d41/Solve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
309,
486,
365,
6315,
76,
79,
7511,
30,
1002,
7265,
16,
296,
2135,
670,
47,
20663,
444,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
309,
486,
365,
6315,
76,
79,
7511,
30,
1002,
7265,
16,
296,
2135,
670,
47,
20663,
444,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
""" register a new transform """ | """register a new transform transform isn't a Zope Transform (the wrapper) but the wrapped transform the persistence wrapper will be created here """ | def registerTransform(self, name, transform): """ register a new transform """ __traceback_info__ = (name, transform) if not name in self.objectIds(): # needed when call from transform.transforms.initialize which # register non zope transform module = "%s" % transform.__module__ transform = Transform(name, module, transform) self._setObject(name, transform) self._mapTransform(transform) | 7a10d9ab1a758898936d7d399a2c2c2ebd050e8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/7a10d9ab1a758898936d7d399a2c2c2ebd050e8e/TransformTool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
4059,
12,
2890,
16,
508,
16,
2510,
4672,
3536,
4861,
279,
394,
2510,
225,
2510,
5177,
1404,
279,
2285,
1306,
11514,
261,
5787,
4053,
13,
1496,
326,
5805,
2510,
326,
9756,
4053,
903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1744,
4059,
12,
2890,
16,
508,
16,
2510,
4672,
3536,
4861,
279,
394,
2510,
225,
2510,
5177,
1404,
279,
2285,
1306,
11514,
261,
5787,
4053,
13,
1496,
326,
5805,
2510,
326,
9756,
4053,
903... |
sage: G.derived_series() | sage: G.derived_series() | def derived_series(self): """ Return the derived series of this group as a list of permutation groups. | c40646cfee847b3de9f0a22861e6bd8fb5ec1cc7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/c40646cfee847b3de9f0a22861e6bd8fb5ec1cc7/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10379,
67,
10222,
12,
2890,
4672,
3536,
2000,
326,
10379,
4166,
434,
333,
1041,
487,
279,
666,
434,
17440,
3252,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
10379,
67,
10222,
12,
2890,
4672,
3536,
2000,
326,
10379,
4166,
434,
333,
1041,
487,
279,
666,
434,
17440,
3252,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
print "Scheduling GPG key and software installation on clients" schedule_actions(key, client_systems) print "Waiting for actions to complete" get_action_results(key, client_systems) | print "Scheduling software installation and actions on clients" client_systems = schedule_actions(key, client_systems) print "Waiting for client actions to complete" client_systems = get_action_results(key, client_systems) print "All actions completed.\n" show_client_results(client_systems) | def main(): if options.demo: key = False current_channels = {} current_channel_labels = ['rhel-x86_64-server-5'] else: # Login to Satellite server key = login(options.user, options.password) # Build existing channel list current_channels = client.channel.list_all_channels(key) current_channel_labels = [] for channel in current_channels: current_channel_labels.append(channel['label']) if options.debug: print "DEBUG: Channels on current Satellite server:", current_channel_labels if client.api.get_version() < 5.1: # TODO: Haven't tested with Spacewalk, not sure how it is reported print "This script uses features not available with Satellite versions older than 5.1" sys.exit(1) if not options.client_actions_only: # This begins the server actions section if not os.path.exists(options.localdir): try: os.makedirs(options.localdir) except: print "Error: Unable to create %s" % (options.localdir) sys.exit(1) if (not options.delete) and (not options.no_rsync): # Sync local Dell repo with public Dell repo returncode = get_dell_repo(DELL_REPO_URL, options.localdir) if not returncode == 0: print "rsync process exited with returncode:", returncode # Build child channels based on dell repo as needed systems = build_channel_list(options.localdir, SYSTEM_VENDOR_ID) systems['platform_independent'] = PLATFORM_INDEPENDENT # Iterate through list of supported RHEL versions and archs, create parent channels if needed channels = {} print "Checking base channels on Satellite server" for parent in SUPPORTED_CHANNELS: if options.verbose: print "Checking base channel", parent # Check each supported base channel, skip if it does not exist on Satellite server if parent not in current_channel_labels: if options.verbose: print "-%s is not a current base channel, skipping." % (parent) continue else: channels[parent] = SUPPORTED_CHANNELS[parent] channels[parent]['child_channels'] = [] # Initialize key for child channels if options.verbose: print "+%s found on Satellite server, checking child channels." % (parent) if channels[parent]['arch'] == 'i386': # This is because Satellite stores x86 as 'ia32' arch = 'channel-ia32' else: arch = 'channel-' + channels[parent]['arch'] subdir = channels[parent]['subdir'] print " Checking child channels for %s" % parent for system in systems: # use system name plus parent to create a unique child channel c_label = DELL_INFO['label'] + '-' + system + '-' + parent c_name = DELL_INFO['name'] + ' on ' + systems[system] + ' for ' + parent c_summary = DELL_INFO['summary'] + ' on ' + systems[system] + ' running ' + parent c_arch = arch c_dir = options.localdir + system + '/' + subdir if options.verbose: print " Checking child channel:", c_label if channel_exists(key, c_label, current_channels): if options.delete: # Delete child channels if requested if options.demo: print "Deleting channel:", c_label else: delete_channel(key, c_label) else: if options.debug: print "DEBUG: checking for dir:", c_dir if options.verbose: print "Child channel already exists:", c_label if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) else: if not options.delete: # Build child channels if needed if options.debug: print "DEBUG: checking for dir:", c_dir if os.path.isdir(c_dir): channels[parent]['child_channels'].append(system) if options.debug: print "DEBUG: %s exists for %s, creating channel" % (subdir, system) if options.demo: if options.verbose: print "Creating child channel:", c_label else: create_channel(key, c_label, c_name, c_summary, c_arch, parent) else: if options.debug: print "DEBUG: %s does not exists for %s" % (subdir, system) if (not options.delete) and (not options.no_packages): # Iterate through channels, pushing rpms from the local repo as needed # TODO: check if rpm is already uploaded and orphaned or part of another channel if options.debug: print "DEBUG: Channel mapping:", channels print "Syncing rpms as needed" for parent in channels: print " Syncing rpms for child channels in %s" % parent for child in channels[parent]['child_channels']: dir = options.localdir + child + '/' + channels[parent]['subdir'] channel = DELL_INFO['label'] + '-' + child + '-' + parent if options.verbose: print " Syncing rpms to child channel", channel if options.debug: print "DEBUG: Looking for rpms in", dir rpms = gen_rpm_list(dir) # Get all packages in child channel existing_packages = client.channel.software.list_all_packages(key, channel) if options.debug: print "DEBUG: Existing packages in", channel, existing_packages for rpm in rpms: if options.debug: print "DEBUG: Working on:", rpm # Strip off '.rpm' at end of file to match against existing entries rpm_name = rpm.split('.rpm')[0] # Now strip off any preceeding paths rpm_name = rpm_name.split('/')[-1] # Iterate through existing packages, and skip existing ones if options.verbose: print "Checking if %s is already on the Satellite server in %s" % (rpm_name, channel) for package in existing_packages: existing_rpm_name = reconstruct_name(package) if options.debug: print "DEBUG: Checking match for %s and %s" % (rpm_name, existing_rpm_name) if existing_rpm_name == rpm_name: # This means the intended rpm is already in Satellite, so skip if options.verbose: print "- %s already in Satellite, skipping" % (rpm_name) break else: if options.verbose: print "+ %s is not in Satellite, adding" % (rpm_name) if options.debug: print "DEBUG: Calling: push_rpm(",rpm, channel, options.user, options.password, options.satserver, ")" returncode = push_rpm(rpm, channel, options.user, options.password, options.satserver) if not returncode == 0: print "rhnpush process exited with returncode:", returncode if returncode == 255: print "You may force package uploads with --force" sys.exit(1) print "Completed uploading rpms." if (not options.server_actions_only) and (not options.demo) and (not options.delete): # This is the client actions section print "Subscribing clients to the %s channel" % (PLATFORM_INDEPENDENT) client_systems = subscribe_clients(key) print "Scheduling GPG key and software installation on clients" schedule_actions(key, client_systems) print "Waiting for actions to complete" get_action_results(key, client_systems) if not options.demo: logout(key) | a505c3724245a7ab265bfa6c2d81e21adace87b1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3457/a505c3724245a7ab265bfa6c2d81e21adace87b1/dell-satellite-sync.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
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,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
309,
702,
18,
27928,
30,
498,
273,
1083,
783,
67,
9114,
273,
2618,
783,
67,
4327,
67,
5336,
273,
10228,
30138,
292,
17,
92,
5292,
67,
1105,
17,
3567,
17,
25,
3546,
469,
... |
def escape_filename(filename): urllib.quote(filename) def unescape_filename(filename): urllib.unquote(filename) | def escape_filename(filename): urllib.quote(filename) | 6a583bb44ce7289a51c018c5459f32dfdd6cc4d4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5569/6a583bb44ce7289a51c018c5459f32dfdd6cc4d4/aff4.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4114,
67,
3459,
12,
3459,
4672,
11527,
18,
6889,
12,
3459,
13,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4114,
67,
3459,
12,
3459,
4672,
11527,
18,
6889,
12,
3459,
13,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... | |
inDaylightSavings = dstStart <= dt.replace( tzinfo=None ) < dstEnd | inDaylightSavings = dstStart <= dt.replace(tzinfo=None) < dstEnd | def _inDaylightSavings( self, dt ): try: dstStart = self.GetDSTStartTime( dt.year ) dstEnd = self.GetDSTEndTime( dt.year ) if dstStart < dstEnd: inDaylightSavings = dstStart <= dt.replace( tzinfo=None ) < dstEnd else: # in the southern hemisphere, daylight savings time # typically ends before it begins in a given year. inDaylightSavings = not ( dstEnd < dt.replace( tzinfo=None ) <= dstStart ) except ValueError: # there was an error parsing the time zone, which is normal when a # start and end time are not specified. inDaylightSavings = False | c68039a3f4004e3fe46621e4c6512fd2401398fc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/677/c68039a3f4004e3fe46621e4c6512fd2401398fc/win32timezone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
267,
4245,
5099,
55,
27497,
12,
365,
16,
3681,
262,
30,
775,
30,
3046,
1685,
273,
365,
18,
967,
40,
882,
13649,
12,
3681,
18,
6874,
262,
3046,
1638,
273,
365,
18,
967,
40,
882,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
267,
4245,
5099,
55,
27497,
12,
365,
16,
3681,
262,
30,
775,
30,
3046,
1685,
273,
365,
18,
967,
40,
882,
13649,
12,
3681,
18,
6874,
262,
3046,
1638,
273,
365,
18,
967,
40,
882,
... |
gump.addText( 250, 120, unicode( "%s" % player.region ), 0x834 ) | gump.addText( 250, 120, unicode( "%s" % unicode(player.region) ), 0x834 ) | def callbackWho( char, args, choice ): socket = char.socket wholist = args[0] if choice.button == 0: return False elif wholist[ choice.button - 10 ]: player = wolfpack.findchar( wholist[ choice.button - 10 ] ) pos = player.pos account = player.account # Socket Information gump = cGump( 0, 0, 0, 50, 50 ) gump.addBackground( 0xE10, 440, 340 ) gump.addResizeGump( 195, 260, 0xBB8, 205, 20 ) gump.addCheckerTrans( 15, 15, 410, 310 ) gump.addGump( 160, 18, 0xFA2 ) gump.addText( 195, 20, unicode( "Socket Menu" ), 0x530 ) gump.addText( 70, 300, unicode("Close"), 0x834 ) gump.addButton( 30, 300, 0xFB1, 0xFB3, 0 ) gump.startPage( 1 ) gump.addText( 50, 60, unicode( "Char name:" ), 0x834 ) gump.addText( 250, 60, unicode( "%s" % player.name ), 0x834 ) gump.addText( 50, 80, unicode( "IP:" ), 0x834 ) gump.addText( 250, 80, unicode( "%s" % player.socket.address ), 0x834 ) gump.addText( 50, 100, unicode( "Position:" ), 0x834 ) gump.addText( 250, 100, unicode( "%i,%i,%i,%i" % ( pos.x, pos.y, pos.z, pos.map ) ), 0x834 ) gump.addText( 50, 120, unicode( "Region:" ), 0x834 ) gump.addText( 250, 120, unicode( "%s" % player.region ), 0x834 ) gump.addText( 50, 140, unicode( "Account / ACL:" ), 0x834 ) gump.addText( 250, 140, unicode( "%s / %s" % ( account.name, account.acl) ), 0x834 ) # Actions # Go To Char gump.addButton( 20, 180, 0xFA5, 0xFA7, 1 ) gump.addText( 50, 180, unicode( "Go to position" ), 0x834 ) # Bring Char gump.addButton( 20, 200, 0xFA5, 0xFA7, 2 ) gump.addText( 50, 200, unicode( "Bring char" ), 0x834 ) # Jail Char gump.addButton( 20, 220, 0xFA5, 0xFA7, 3 ) gump.addText( 50, 220, unicode( "Jail char" ), 0x834 ) # Forgive Char gump.addButton( 220, 220, 0xFA5, 0xFA7, 4 ) gump.addText( 250, 220, unicode( "Forgive char" ), 0x834 ) # Show Char Info Gump gump.addButton( 220, 180, 0xFAB, 0xFAD, 5 ) gump.addText( 250, 180, unicode( "Show char info gump" ), 0x834 ) # Send Message gump.addButton( 20, 260, 0xFBD, 0xFBF, 6 ) gump.addText( 50, 260, unicode( "Send message:" ), 0x834 ) gump.addInputField( 200, 260, 190, 16, 0x834, 1, unicode( "<msg>" ) ) # Disconnect gump.addButton( 220, 200, 0xFA5, 0xFA7, 7 ) gump.addText( 250, 200, unicode( "Disconnect" ), 0x834 ) # Stuff and Send gump.setCallback( "commands.who.callbackSocket" ) gump.setArgs( [ player.serial ] ) gump.send( socket ) return True else: return False | 810111476cb90665e8d178a8f09317afee55dc12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/810111476cb90665e8d178a8f09317afee55dc12/who.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1348,
2888,
83,
12,
1149,
16,
833,
16,
6023,
262,
30,
2987,
273,
1149,
18,
7814,
600,
355,
376,
273,
833,
63,
20,
65,
309,
6023,
18,
5391,
422,
374,
30,
327,
1083,
1327,
600,
355,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1348,
2888,
83,
12,
1149,
16,
833,
16,
6023,
262,
30,
2987,
273,
1149,
18,
7814,
600,
355,
376,
273,
833,
63,
20,
65,
309,
6023,
18,
5391,
422,
374,
30,
327,
1083,
1327,
600,
355,
... |
ll=m.group('after') | ll=m.group('after').strip() | def analyzeline(m,case,line): global groupcounter,groupname,groupcache,grouplist,filepositiontext,\ currentfilename,f77modulename,neededinterface,neededmodule,expectbegin,\ gotnextfile,previous_context block=m.group('this') if case != 'multiline': previous_context = None if expectbegin and case not in ['begin','call','callfun','type'] \ and not skipemptyends and groupcounter<1: newname=string.split(os.path.basename(currentfilename),'.')[0] outmess('analyzeline: no group yet. Creating program group with name "%s".\n'%newname) gotnextfile=0 groupcounter=groupcounter+1 groupname[groupcounter]='program' groupcache[groupcounter]={} grouplist[groupcounter]=[] groupcache[groupcounter]['body']=[] groupcache[groupcounter]['vars']={} groupcache[groupcounter]['block']='program' groupcache[groupcounter]['name']=newname groupcache[groupcounter]['from']='fromsky' expectbegin=0 if case in ['begin','call','callfun']: # Crack line => block,name,args,result block = block.lower() if re.match(r'block\s*data',block,re.I): block='block data' if re.match(r'python\s*module',block,re.I): block='python module' name,args,result = _resolvenameargspattern(m.group('after')) if name is None: if block=='block data': name = '_BLOCK_DATA_' else: name = '' if block not in ['interface','block data']: outmess('analyzeline: No name/args pattern found for line.\n') previous_context = (block,name,groupcounter) if args: args=rmbadname(map(string.strip,string.split(markoutercomma(args),'@,@'))) else: args=[] if '' in args: while '' in args: args.remove('') outmess('analyzeline: argument list is malformed (missing argument).\n') # end of crack line => block,name,args,result needmodule=0 needinterface=0 if case in ['call','callfun']: needinterface=1 if not groupcache[groupcounter].has_key('args'): return if name not in groupcache[groupcounter]['args']: return for it in grouplist[groupcounter]: if it['name']==name: return if name in groupcache[groupcounter]['interfaced']: return block={'call':'subroutine','callfun':'function'}[case] if f77modulename and neededmodule==-1 and groupcounter<=1: neededmodule=groupcounter+2 needmodule=1 needinterface=1 # Create new block(s) groupcounter=groupcounter+1 groupcache[groupcounter]={} grouplist[groupcounter]=[] if needmodule: if verbose>1: outmess('analyzeline: Creating module block %s\n'%`f77modulename`,0) groupname[groupcounter]='module' groupcache[groupcounter]['block']='python module' groupcache[groupcounter]['name']=f77modulename groupcache[groupcounter]['from']='' groupcache[groupcounter]['body']=[] groupcache[groupcounter]['externals']=[] groupcache[groupcounter]['interfaced']=[] groupcache[groupcounter]['vars']={} groupcounter=groupcounter+1 groupcache[groupcounter]={} grouplist[groupcounter]=[] if needinterface: if verbose>1: outmess('analyzeline: Creating additional interface block.\n',0) groupname[groupcounter]='interface' groupcache[groupcounter]['block']='interface' groupcache[groupcounter]['name']='unknown_interface' groupcache[groupcounter]['from']='%s:%s'%(groupcache[groupcounter-1]['from'],groupcache[groupcounter-1]['name']) groupcache[groupcounter]['body']=[] groupcache[groupcounter]['externals']=[] groupcache[groupcounter]['interfaced']=[] groupcache[groupcounter]['vars']={} groupcounter=groupcounter+1 groupcache[groupcounter]={} grouplist[groupcounter]=[] groupname[groupcounter]=block groupcache[groupcounter]['block']=block if not name: name='unknown_'+block groupcache[groupcounter]['prefix']=m.group('before') groupcache[groupcounter]['name']=rmbadname1(name) groupcache[groupcounter]['result']=result if groupcounter==1: groupcache[groupcounter]['from']=currentfilename else: if f77modulename and groupcounter==3: groupcache[groupcounter]['from']='%s:%s'%(groupcache[groupcounter-1]['from'],currentfilename) else: groupcache[groupcounter]['from']='%s:%s'%(groupcache[groupcounter-1]['from'],groupcache[groupcounter-1]['name']) for k in groupcache[groupcounter].keys(): if not groupcache[groupcounter][k]: del groupcache[groupcounter][k] groupcache[groupcounter]['args']=args groupcache[groupcounter]['body']=[] groupcache[groupcounter]['externals']=[] groupcache[groupcounter]['interfaced']=[] groupcache[groupcounter]['vars']={} groupcache[groupcounter]['entry']={} # end of creation if block=='type': groupcache[groupcounter]['varnames'] = [] if case in ['call','callfun']: # set parents variables if name not in groupcache[groupcounter-2]['externals']: groupcache[groupcounter-2]['externals'].append(name) groupcache[groupcounter]['vars']=copy.deepcopy(groupcache[groupcounter-2]['vars']) #try: del groupcache[groupcounter]['vars'][groupcache[groupcounter-2]['name']] #except: pass try: del groupcache[groupcounter]['vars'][name][groupcache[groupcounter]['vars'][name]['attrspec'].index('external')] except: pass if block in ['function','subroutine']: # set global attributes try: groupcache[groupcounter]['vars'][name]=appenddecl(groupcache[groupcounter]['vars'][name],groupcache[groupcounter-2]['vars']['']) except: pass if case=='callfun': # return type if result and groupcache[groupcounter]['vars'].has_key(result): if not name==result: groupcache[groupcounter]['vars'][name]=appenddecl(groupcache[groupcounter]['vars'][name],groupcache[groupcounter]['vars'][result]) #if groupcounter>1: # name is interfaced try: groupcache[groupcounter-2]['interfaced'].append(name) except: pass if block=='function': t=typespattern[0].match(m.group('before')+' '+name) if t: typespec,selector,attr,edecl=cracktypespec0(t.group('this'),t.group('after')) updatevars(typespec,selector,attr,edecl) if case in ['call','callfun']: grouplist[groupcounter-1].append(groupcache[groupcounter]) grouplist[groupcounter-1][-1]['body']=grouplist[groupcounter] del grouplist[groupcounter] groupcounter=groupcounter-1 # end routine grouplist[groupcounter-1].append(groupcache[groupcounter]) grouplist[groupcounter-1][-1]['body']=grouplist[groupcounter] del grouplist[groupcounter] groupcounter=groupcounter-1 # end interface elif case=='entry': name,args,result=_resolvenameargspattern(m.group('after')) if name is not None: if args: args=rmbadname(map(string.strip,string.split(markoutercomma(args),'@,@'))) else: args=[] assert result is None,`result` groupcache[groupcounter]['entry'][name] = args previous_context = ('entry',name,groupcounter) elif case=='type': typespec,selector,attr,edecl=cracktypespec0(block,m.group('after')) last_name = updatevars(typespec,selector,attr,edecl) if last_name is not None: previous_context = ('variable',last_name,groupcounter) elif case in ['dimension','intent','optional','required','external','public','private','intrisic']: edecl=groupcache[groupcounter]['vars'] ll=m.group('after') i=string.find(ll,'::') if i<0 and case=='intent': i=string.find(markouterparen(ll),'@)@')-2 ll=ll[:i+1]+'::'+ll[i+1:] i=string.find(ll,'::') if ll[i:]=='::' and groupcache[groupcounter].has_key('args'): outmess('All arguments will have attribute %s%s\n'%(m.group('this'),ll[:i])) ll = ll + string.join(groupcache[groupcounter]['args'],',') if i<0:i=0;pl='' else: pl=string.strip(ll[:i]);ll=ll[i+2:] ch = string.split(markoutercomma(pl),'@,@') if len(ch)>1: pl = ch[0] outmess('analyzeline: cannot handle multiple attributes without type specification. Ignoring %r.\n' % (','.join(ch[1:]))) last_name = None for e in map(string.strip,string.split(markoutercomma(ll),'@,@')): m1=namepattern.match(e) if not m1: if case in ['public','private']: k='' else: print m.groupdict() outmess('analyzeline: no name pattern found in %s statement for %s. Skipping.\n'%(case,`e`)) continue else: k=rmbadname1(m1.group('name')) if not edecl.has_key(k): edecl[k]={} if case=='dimension': ap=case+m1.group('after') if case=='intent': ap=m.group('this')+pl if _intentcallbackpattern.match(ap): if k not in groupcache[groupcounter]['args']: if groupcounter>1 and \ string.find(groupcache[groupcounter-2]['name'], '__user__')==-1: outmess('analyzeline: appending intent(callback) %s'\ ' to %s arguments\n' % (k,groupcache[groupcounter]['name'])) groupcache[groupcounter]['args'].append(k) else: errmess('analyzeline: intent(callback) %s is already'\ ' in argument list' % (k)) if case in ['optional','required','public','external','private','intrisic']: ap=case if edecl[k].has_key('attrspec'): edecl[k]['attrspec'].append(ap) else: edecl[k]['attrspec']=[ap] if case=='external': if groupcache[groupcounter]['block']=='program': outmess('analyzeline: ignoring program arguments\n') continue if k not in groupcache[groupcounter]['args']: #outmess('analyzeline: ignoring external %s (not in arguments list)\n'%(`k`)) continue if not groupcache[groupcounter].has_key('externals'): groupcache[groupcounter]['externals']=[] groupcache[groupcounter]['externals'].append(k) last_name = k groupcache[groupcounter]['vars']=edecl if last_name is not None: previous_context = ('variable',last_name,groupcounter) elif case=='parameter': edecl=groupcache[groupcounter]['vars'] ll=string.strip(m.group('after'))[1:-1] last_name = None for e in string.split(markoutercomma(ll),'@,@'): try: k,initexpr=map(string.strip,string.split(e,'=')) except: outmess('analyzeline: could not extract name,expr in parameter statement "%s" of "%s"\n'%(e,ll));continue params = get_parameters(edecl) k=rmbadname1(k) if not edecl.has_key(k): edecl[k]={} if edecl[k].has_key('=') and (not edecl[k]['=']==initexpr): outmess('analyzeline: Overwriting the value of parameter "%s" ("%s") with "%s".\n'%(k,edecl[k]['='],initexpr)) t = determineexprtype(initexpr,params) if t: if t.get('typespec')=='real': tt = list(initexpr) for m in real16pattern.finditer(initexpr): tt[m.start():m.end()] = list(\ initexpr[m.start():m.end()].lower().replace('d', 'e')) initexpr = "".join(tt) elif t.get('typespec')=='complex': initexpr = initexpr[1:].lower().replace('d','e').\ replace(',','+1j*(') try: v = eval(initexpr,{},params) except (SyntaxError,NameError),msg: errmess('analyzeline: Failed to evaluate %r. Ignoring: %s\n'\ % (initexpr, msg)) continue edecl[k]['='] = repr(v) if edecl[k].has_key('attrspec'): edecl[k]['attrspec'].append('parameter') else: edecl[k]['attrspec']=['parameter'] last_name = k groupcache[groupcounter]['vars']=edecl if last_name is not None: previous_context = ('variable',last_name,groupcounter) elif case=='implicit': if string.lower(string.strip(m.group('after')))=='none': groupcache[groupcounter]['implicit']=None elif m.group('after'): if groupcache[groupcounter].has_key('implicit'): impl=groupcache[groupcounter]['implicit'] else: impl={} if impl is None: outmess('analyzeline: Overwriting earlier "implicit none" statement.\n') impl={} for e in string.split(markoutercomma(m.group('after')),'@,@'): decl={} m1=re.match(r'\s*(?P<this>.*?)\s*(\(\s*(?P<after>[a-z-, ]+)\s*\)\s*|)\Z',e,re.I) if not m1: outmess('analyzeline: could not extract info of implicit statement part "%s"\n'%(e));continue m2=typespattern4implicit.match(m1.group('this')) if not m2: outmess('analyzeline: could not extract types pattern of implicit statement part "%s"\n'%(e));continue typespec,selector,attr,edecl=cracktypespec0(m2.group('this'),m2.group('after')) kindselect,charselect,typename=cracktypespec(typespec,selector) decl['typespec']=typespec decl['kindselector']=kindselect decl['charselector']=charselect decl['typename']=typename for k in decl.keys(): if not decl[k]: del decl[k] for r in string.split(markoutercomma(m1.group('after')),'@,@'): if '-' in r: try: begc,endc=map(string.strip,string.split(r,'-')) except: outmess('analyzeline: expected "<char>-<char>" instead of "%s" in range list of implicit statement\n'%r);continue else: begc=endc=string.strip(r) if not len(begc)==len(endc)==1: outmess('analyzeline: expected "<char>-<char>" instead of "%s" in range list of implicit statement (2)\n'%r);continue for o in range(ord(begc),ord(endc)+1): impl[chr(o)]=decl groupcache[groupcounter]['implicit']=impl elif case=='data': ll=[] dl='';il='';f=0;fc=1 for c in m.group('after'): if c=="'": fc=not fc if c=='/' and fc: f=f+1;continue if f==0: dl=dl+c elif f==1: il=il+c elif f==2: dl = dl.strip() if dl.startswith(','): dl = dl[1:].strip() ll.append([dl,il]) dl=c;il='';f=0 if f==2: dl = dl.strip() if dl.startswith(','): dl = dl[1:].strip() ll.append([dl,il]) vars={} if groupcache[groupcounter].has_key('vars'): vars=groupcache[groupcounter]['vars'] last_name = None for l in ll: l=map(string.strip,l) if l[0][0]==',':l[0]=l[0][1:] if l[0][0]=='(': outmess('analyzeline: implied-DO list "%s" is not supported. Skipping.\n'%l[0]) continue #if '(' in l[0]: # #outmess('analyzeline: ignoring this data statement.\n') # continue i=0;j=0;llen=len(l[1]) for v in rmbadname(map(string.strip,string.split(markoutercomma(l[0]),'@,@'))): if v[0]=='(': outmess('analyzeline: implied-DO list "%s" is not supported. Skipping.\n'%v) # XXX: subsequent init expressions may get wrong values. # Ignoring since data statements are irrelevant for wrapping. continue fc=0 while (i<llen) and (fc or not l[1][i]==','): if l[1][i]=="'": fc=not fc i=i+1 i=i+1 #v,l[1][j:i-1]=name,initvalue if not vars.has_key(v): vars[v]={} if vars[v].has_key('=') and not vars[v]['=']==l[1][j:i-1]: outmess('analyzeline: changing init expression of "%s" ("%s") to "%s"\n'%(v,vars[v]['='],l[1][j:i-1])) vars[v]['=']=l[1][j:i-1] j=i last_name = v groupcache[groupcounter]['vars']=vars if last_name is not None: previous_context = ('variable',last_name,groupcounter) elif case=='common': line=string.strip(m.group('after')) if not line[0]=='/':line='//'+line cl=[] f=0;bn='';ol='' for c in line: if c=='/':f=f+1;continue if f>=3: bn = string.strip(bn) if not bn: bn='_BLNK_' cl.append([bn,ol]) f=f-2;bn='';ol='' if f%2: bn=bn+c else: ol=ol+c bn = string.strip(bn) if not bn: bn='_BLNK_' cl.append([bn,ol]) commonkey={} if groupcache[groupcounter].has_key('common'): commonkey=groupcache[groupcounter]['common'] for c in cl: if commonkey.has_key(c[0]): outmess('analyzeline: previously defined common block encountered. Skipping.\n') continue commonkey[c[0]]=[] for i in map(string.strip,string.split(markoutercomma(c[1]),'@,@')): if i: commonkey[c[0]].append(i) groupcache[groupcounter]['common']=commonkey previous_context = ('common',bn,groupcounter) elif case=='use': m1=re.match(r'\A\s*(?P<name>\b[\w]+\b)\s*((,(\s*\bonly\b\s*:|(?P<notonly>))\s*(?P<list>.*))|)\s*\Z',m.group('after'),re.I) if m1: mm=m1.groupdict() if not groupcache[groupcounter].has_key('use'): groupcache[groupcounter]['use']={} name=m1.group('name') groupcache[groupcounter]['use'][name]={} isonly=0 if mm.has_key('list') and mm['list'] is not None: if mm.has_key('notonly') and mm['notonly'] is None:isonly=1 groupcache[groupcounter]['use'][name]['only']=isonly ll=map(string.strip,string.split(mm['list'],',')) rl={} for l in ll: if '=' in l: m2=re.match(r'\A\s*(?P<local>\b[\w]+\b)\s*=\s*>\s*(?P<use>\b[\w]+\b)\s*\Z',l,re.I) if m2: rl[string.strip(m2.group('local'))]=string.strip(m2.group('use')) else: outmess('analyzeline: Not local=>use pattern found in %s\n'%`l`) else: rl[l]=l groupcache[groupcounter]['use'][name]['map']=rl else: pass else: print m.groupdict() outmess('analyzeline: Could not crack the use statement.\n') elif case in ['f2pyenhancements']: if not groupcache[groupcounter].has_key ('f2pyenhancements'): groupcache[groupcounter]['f2pyenhancements'] = {} d = groupcache[groupcounter]['f2pyenhancements'] if m.group('this')=='usercode' and d.has_key('usercode'): if type(d['usercode']) is type(''): d['usercode'] = [d['usercode']] d['usercode'].append(m.group('after')) else: d[m.group('this')] = m.group('after') elif case=='multiline': if previous_context is None: if verbose: outmess('analyzeline: No context for multiline block.\n') return gc = groupcounter #gc = previous_context[2] appendmultiline(groupcache[gc], previous_context[:2], m.group('this')) else: if verbose>1: print m.groupdict() outmess('analyzeline: No code implemented for line.\n') | 8913a2b030b2ecbf76d19e32dd38f8e56b8ffd32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/8913a2b030b2ecbf76d19e32dd38f8e56b8ffd32/crackfortran.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
392,
4647,
3027,
12,
81,
16,
3593,
16,
1369,
4672,
2552,
1041,
7476,
16,
1655,
529,
16,
1655,
2493,
16,
75,
14004,
17842,
16,
768,
3276,
955,
17211,
783,
3459,
16,
74,
4700,
1711,
332,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
392,
4647,
3027,
12,
81,
16,
3593,
16,
1369,
4672,
2552,
1041,
7476,
16,
1655,
529,
16,
1655,
2493,
16,
75,
14004,
17842,
16,
768,
3276,
955,
17211,
783,
3459,
16,
74,
4700,
1711,
332,... |
assert out.getvalue() == """\ | assert not show_diff(out.getvalue(), """\ | def exercise_modifiers(verbose=0): if (verbose): out = sys.stdout mtz_object = mtz.object() mtz_object.set_title(title="012345678") assert mtz_object.title() == "012345678" mtz_object.set_title(title="012345678", append=True) assert mtz_object.title() == "012345678 012345678" mtz_object.set_title(title="0123456789"*10+"012345678", append=True) assert mtz_object.title() == "012345678 "*2 + "0123456789"*5 mtz_object.set_title("0123456789"*100) assert mtz_object.title() == "0123456789"*7 mtz_object.add_history(lines=flex.std_string(["a1", "a2"])) assert list(mtz_object.history()) == ["a1", "a2"] mtz_object.add_history(lines=flex.std_string(["b1", "b2"])) assert list(mtz_object.history()) == ["b1", "b2", "a1", "a2"] mtz_object.add_history(line="c1") assert list(mtz_object.history()) == ["c1", "b1", "b2", "a1", "a2"] mtz_object.set_space_group_name(name="sg"*100) assert mtz_object.space_group_name() == "sgsgsgsgsgsgsgsgsgsg" mtz_object.set_space_group_number(number=12) assert mtz_object.space_group_number() == 12 mtz_object.set_point_group_name(name="pg"*100) assert mtz_object.point_group_name() == "pgpgpgpgpg" mtz_object.set_lattice_centring_type(symbol="C") assert mtz_object.lattice_centring_type() == "C" for space_group_symbols in sgtbx.space_group_symbol_iterator(): space_group = sgtbx.space_group(space_group_symbols) mtz_object.set_space_group(space_group) assert mtz_object.space_group() == space_group assert mtz_object.n_symmetry_matrices() == space_group.order_z() mtz_object = mtz.object() \ .set_title(title="exercise") \ .add_history(lines=flex.std_string(["h2"])) \ .add_history(line="h1") \ .set_space_group_name("sg") \ .set_space_group_number(123) \ .set_point_group_name("pg") \ .set_space_group(sgtbx.space_group_info(number=123).group()) assert mtz_object.title() == "exercise" assert list(mtz_object.history()) == ["h1", "h2"] for stage in [0,1]: for i_crystal in xrange(3): if (stage == 0): if (i_crystal % 2 == 0): crystal = mtz_object.add_crystal( name="crystal_%d"%i_crystal, project_name="project_%d"%i_crystal, unit_cell_parameters=(10+i_crystal,20,20,90,90,120)) else: crystal = mtz_object.add_crystal( name="crystal_%d"%i_crystal, project_name="project_%d"%i_crystal, unit_cell=uctbx.unit_cell((10+i_crystal,20,20,90,90,120))) else: crystal = mtz_object.crystals()[i_crystal] assert crystal.i_crystal() == i_crystal assert crystal.name() == "crystal_%d"%i_crystal assert crystal.project_name() == "project_%d"%i_crystal assert approx_equal(crystal.unit_cell_parameters(), (10+i_crystal,20,20,90,90,120)) if (not verbose): out = StringIO() mtz_object.show_summary(out=out) if (not verbose): assert out.getvalue() == """\ | c3cf0722281a181a283d00bb69ac8271125a2ef3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/c3cf0722281a181a283d00bb69ac8271125a2ef3/tst_ext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24165,
67,
15432,
12,
11369,
33,
20,
4672,
309,
261,
11369,
4672,
596,
273,
2589,
18,
10283,
5874,
94,
67,
1612,
273,
5874,
94,
18,
1612,
1435,
5874,
94,
67,
1612,
18,
542,
67,
2649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24165,
67,
15432,
12,
11369,
33,
20,
4672,
309,
261,
11369,
4672,
596,
273,
2589,
18,
10283,
5874,
94,
67,
1612,
273,
5874,
94,
18,
1612,
1435,
5874,
94,
67,
1612,
18,
542,
67,
2649,
... |
@rtype: QString @note: inSelection is not used. @warning: this may have issues since it appears to return a str (not QString). | @rtype: str | def convertUnrecognized( self, inSequence = None, inSelection = None ): """ Substitutes an 'N' for any unrecognized/invalid characters (alphanumeric or symbolic) in the sequence @param inSequence: The strand sequence. @type inSequence: str @param inSelection: @type inSelection: @return: The new sequence. @rtype: QString @note: inSelection is not used. @warning: this may have issues since it appears to return a str (not QString). """ if inSequence == None: outSequence = self.sequenceTextEdit.toPlainText() else: outSequence = QString( inSequence ) | 266b2b865edd2c99d52e9395be541722ac43f0e0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/266b2b865edd2c99d52e9395be541722ac43f0e0/DnaGeneratorPropertyManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
19648,
12,
365,
16,
316,
4021,
282,
273,
225,
599,
16,
316,
6233,
225,
273,
225,
599,
262,
30,
3536,
2592,
5223,
993,
392,
296,
50,
11,
364,
1281,
28333,
19,
5387,
3949,
261,
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,
1765,
19648,
12,
365,
16,
316,
4021,
282,
273,
225,
599,
16,
316,
6233,
225,
273,
225,
599,
262,
30,
3536,
2592,
5223,
993,
392,
296,
50,
11,
364,
1281,
28333,
19,
5387,
3949,
261,
2... |
"""GroupList contains a list with touples containing resclass, group button and launcherpath.""" | """GroupList contains a list with touples containing identifier, group button and launcherpath.""" | def execute(self, command): command = self.remove_args(command) if os.path.isdir(command[0]): command = "xdg-open '" + " ".join(command) + "' &" else: command = "/bin/sh -c '" + " ".join(command) + "' &" os.system(command) | dcfb9af5533d0897251e6cd781e65ac4dc13c932 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7075/dcfb9af5533d0897251e6cd781e65ac4dc13c932/dockbarx.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
1296,
4672,
1296,
273,
365,
18,
4479,
67,
1968,
12,
3076,
13,
309,
1140,
18,
803,
18,
291,
1214,
12,
3076,
63,
20,
65,
4672,
1296,
273,
315,
7669,
75,
17,
3190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
16,
1296,
4672,
1296,
273,
365,
18,
4479,
67,
1968,
12,
3076,
13,
309,
1140,
18,
803,
18,
291,
1214,
12,
3076,
63,
20,
65,
4672,
1296,
273,
315,
7669,
75,
17,
3190,
... |
ModelId == DataClass.MODEL_IDENTIFIER_UNION | ValueModelId = DataClass.MODEL_IDENTIFIER_UNION | def CheckDeclTypedefFormat(FullFileName, ModelId): ErrorMsgList = [] FileID = GetTableID(FullFileName, ErrorMsgList) if FileID < 0: return ErrorMsgList Db = GetDB() FileTable = 'Identifier' + str(FileID) SqlStatement = """ select Name, StartLine, EndLine, ID, Value from %s where Model = %d """ % (FileTable, ModelId) ResultSet = Db.TblFile.Exec(SqlStatement) ResultList = [] for Result in ResultSet: ResultList.append(Result) ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_ALL if ModelId == DataClass.MODEL_IDENTIFIER_STRUCTURE: ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_STRUCTURE_DECLARATION if ModelId == DataClass.MODEL_IDENTIFIER_ENUMERATE: ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_ENUMERATED_TYPE if ModelId == DataClass.MODEL_IDENTIFIER_UNION: ErrorType = ERROR_DECLARATION_DATA_TYPE_CHECK_UNION_TYPE SqlStatement = """ select Modifier, Name, Value, StartLine, EndLine, ID from %s where Model = %d """ % (FileTable, DataClass.MODEL_IDENTIFIER_TYPEDEF) TdSet = Db.TblFile.Exec(SqlStatement) TdList = [] for Td in TdSet: TdList.append(Td) # Check member variable name format that from typedefs of ONLY this file. for Td in TdList: Value = Td[2].strip() if Value.startswith('enum'): ModelId = DataClass.MODEL_IDENTIFIER_ENUMERATE elif Value.startswith('struct'): ModelId = DataClass.MODEL_IDENTIFIER_STRUCTURE elif Value.startswith('union'): ModelId == DataClass.MODEL_IDENTIFIER_UNION else: pass # Check member variable format. ErrMsgList = CheckMemberVariableFormat(Value, ModelId) for ErrMsg in ErrMsgList: if EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, ErrMsg): continue PrintErrorMsg(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, 'Member variable %s NOT follow naming convention.' % ErrMsg, FileTable, Td[5]) IncludeFileList = GetAllIncludeFiles(FullFileName) for F in IncludeFileList: FileID = GetTableID(F, ErrorMsgList) if FileID < 0: continue IncludeFileTable = 'Identifier' + str(FileID) SqlStatement = """ select Modifier, Name, Value, StartLine, EndLine, ID from %s where Model = %d """ % (IncludeFileTable, DataClass.MODEL_IDENTIFIER_TYPEDEF) ResultSet = Db.TblFile.Exec(SqlStatement) TdList.extend(ResultSet) for Result in ResultList: # Check member variable format. ErrMsgList = CheckMemberVariableFormat(Result[4], ModelId) for ErrMsg in ErrMsgList: if EccGlobalData.gException.IsException(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, ErrMsg): continue PrintErrorMsg(ERROR_NAMING_CONVENTION_CHECK_VARIABLE_NAME, 'Member variable %s NOT follow naming convention.' % ErrMsg, FileTable, Result[3]) # Check whether it is typedefed. Found = False for Td in TdList: if len(Td[0]) > 0: continue if Result[1] >= Td[3] and Td[4] >= Result[2]: Found = True if not Td[1].isupper(): PrintErrorMsg(ErrorType, 'Typedef should be UPPER case', FileTable, Td[5]) if Result[0] in Td[2].split(): Found = True if not Td[1].isupper(): PrintErrorMsg(ErrorType, 'Typedef should be UPPER case', FileTable, Td[5]) if not Found: PrintErrorMsg(ErrorType, 'No Typedef for %s' % Result[0], FileTable, Result[3]) continue | 55da07841c0281c8e74a15a63c3242d3f5b84ac8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/914/55da07841c0281c8e74a15a63c3242d3f5b84ac8/c.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
3456,
559,
536,
1630,
12,
5080,
4771,
16,
3164,
548,
4672,
1068,
3332,
682,
273,
5378,
225,
1387,
734,
273,
968,
1388,
734,
12,
5080,
4771,
16,
1068,
3332,
682,
13,
309,
1387,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
3456,
559,
536,
1630,
12,
5080,
4771,
16,
3164,
548,
4672,
1068,
3332,
682,
273,
5378,
225,
1387,
734,
273,
968,
1388,
734,
12,
5080,
4771,
16,
1068,
3332,
682,
13,
309,
1387,
73... |
self.safe_remove(ABSTFN + "/link-y") self.safe_rmdir(ABSTFN + "/k/y") self.safe_rmdir(ABSTFN + "/k") self.safe_rmdir(ABSTFN) | test_support.unlink(ABSTFN + "/link-y") safe_rmdir(ABSTFN + "/k/y") safe_rmdir(ABSTFN + "/k") safe_rmdir(ABSTFN) | def test_realpath_resolve_before_normalizing(self): # Bug #990669: Symbolic links should be resolved before we # normalize the path. E.g.: if we have directories 'a', 'k' and 'y' # in the following hierarchy: # a/k/y # # and a symbolic link 'link-y' pointing to 'y' in directory 'a', # then realpath("link-y/..") should return 'k', not 'a'. try: old_path = abspath('.') os.mkdir(ABSTFN) os.mkdir(ABSTFN + "/k") os.mkdir(ABSTFN + "/k/y") os.symlink(ABSTFN + "/k/y", ABSTFN + "/link-y") | 3daf60bdfe4bb713399929b64a36849597f2be05 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/3daf60bdfe4bb713399929b64a36849597f2be05/test_posixpath.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
7688,
803,
67,
10828,
67,
5771,
67,
6130,
6894,
12,
2890,
4672,
468,
16907,
468,
2733,
20,
6028,
29,
30,
16455,
12164,
4716,
1410,
506,
4640,
1865,
732,
468,
3883,
326,
589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7688,
803,
67,
10828,
67,
5771,
67,
6130,
6894,
12,
2890,
4672,
468,
16907,
468,
2733,
20,
6028,
29,
30,
16455,
12164,
4716,
1410,
506,
4640,
1865,
732,
468,
3883,
326,
589,
... |
args = [ viewer_path, "--casapy" ] | def __launch( self ): | 77393ac9c9066879098df9a0aae15adf5ec67797 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/77393ac9c9066879098df9a0aae15adf5ec67797/viewertool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
20738,
12,
365,
262,
30,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
20738,
12,
365,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
orbiterpath= StringProperty(name="Orbiter Path", description="Orbiter spacesim path", maxlen=1024, default="/home/vlad/programs/orbiter", subtype="DIR_PATH") | orbiterpath= StringProperty(name="Orbiter Path", description="Orbiter spacesim path", maxlen=1024, default=ORBITER_PATH_DEFALT, subtype="DIR_PATH") | def load_msh(filename,orbiterpath,convert_coords,show_single_sided): '''Read MSH file''' print("filepath=",filename,"orbiterpath=",orbiterpath) file=open(filename,"r") s=file.readline(); if s!='MSHX1\n': print("This file is not orbiter mesh: ",s) return else: print("Orbiter mesh format detected ") n_groups=0 #N of groups from header n_materials=0 #N of mats from header n_textures=0 #N of texs from header n_grp=0 #real N of groups mat=[] #mats in group (int) tex=[] #texs in group (int) groups=[] #groups description [label(str),mat(int),tex(int),nv(int),nt(int),obj(bpy.data.object)] materials=[] #materials description [name,[diff RGBA],[amb RGBA],[spec RGBAP],[emit RGBA]] textures=[] #[texture filename, texture name] while True: s=file.readline() if s=='': break; v=s.split() #print (v) #------Reading GROUPS section------------- if v[0]=="GROUPS": print("------------------------Reading groups:----------------------------") n_groups=int(v[1]); n_mat=0; n_tex=0 #group material and texture label="" while n_grp<n_groups: s1=file.readline(); v1=s1.split() #if v1[0]=="NONORMAL": # print("NONORMAL!") if v1[0]=="LABEL": label=v1[1] if v1[0]=="MATERIAL": n_mat=int(v1[1].rstrip(";")) #rstrip is for buggy files with ";" after digit if v1[0]=="TEXTURE": n_tex=int(v1[1].rstrip(";")) #Reading geometry if v1[0]=="GEOM": vtx=[] tri=[] norm=[] uv=[] nv=int(v1[1]) nt=int(v1[2].rstrip(";")) #print ("Group No:",n_grp," verts=",nv," tris=",nt) for n in range(nv): s2=file.readline(); v2=s2.split(); #print(v2); #if label=="cargodooroutL": # print("#####RAW DATA OF GEOM: ",label) # print (v2) if convert_coords: vtx.append([-float(v2[0]),-float(v2[2]),float(v2[1])])# convert from left-handed coord system else: vtx.append([float(v2[0]),float(v2[1]),float(v2[2])]) #without conversion if len(v2)>5: #there are normals (not vtx+uvs only) #should I convert the normals? norm.append([float(v2[3]),float(v2[4]),float(v2[5])]) convert_uvs=True; ##test mode= uvs without conversion if len(v2)==8: #there are normals and uvs if convert_uvs: #in Blender, (0,0) is the upper-left corner. #in Orbiter -- lower-left corner. So I must invert V axis uv.append([float(v2[6]),1.0-float(v2[7])]) else: uv.append([float(v2[6]),float(v2[7])]) elif len(v2)==5: #there are only uvs if convert_uvs: uv.append([float(v2[3]),1.0-float(v2[4])]) else: uv.append([float(v2[3]),float(v2[4])]) for n in range(nt): #read triangles s2=file.readline(); v2=s2.split(); if convert_coords: tri.append([int(v2[0]),int(v2[2]),int(v2[1])]) #reverted triangle else: tri.append([int(v2[0]),int(v2[1]),int(v2[2])]) #non reverted triangle #print (vtx) #print(norm) n_grp=n_grp+1; if label=='': label="ORBGroup"+str(n_grp) obj=create_mesh(label,vtx,tri,norm,uv,show_single_sided) groups.append([label,n_mat,n_tex,nv,nt,obj]) label="" #--------------Reading MATERIALS section----------------------- elif v[0]=="MATERIALS": n_materials=int(v[1]) print("-------Reading Materials section,nmats=",n_materials,"------------") #material names for i in range (n_materials): materials.append([file.readline().strip()]) #material properties for i in range (n_materials): file.readline(); # TODO: material name checking for n in range(4): s1=file.readline() v1=s1.split() print("Reading material component,n=",n," comp=",v1) if (n==2)and(len(v1)==5): #Specular,5 components materials[i].append([float(v1[0]),float(v1[1]),float(v1[2]),float(v1[3]),float(v1[4])]) else: #Other, 4 components materials[i].append([float(v1[0]),float(v1[1]),float(v1[2]),float(v1[3])]) #---------------Reading TEXTURES section------------------ elif v[0]=="TEXTURES": print("-----------Reading TEXTURES section---------------") n_textures=int(v[1]); for i in range(n_textures): textures.append([file.readline().strip(),"ORBTexture"+str(i)]) print(""); print("==========================Summary===========================================") print("Headers: groups=",n_groups," materials=",n_materials," textures=",n_textures) print("\nData:\nGroups:") print(groups,"\nReal No=",len(groups)) print("Materials:",materials) print("Textures:",textures) file.close() #end reading file create_materials(groups,materials,textures,orbiterpath) return{"FINISHED"} | 73d6f7f3efd80261b49a94fc5a4cf9247fde5ae0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10993/73d6f7f3efd80261b49a94fc5a4cf9247fde5ae0/io_import_msh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
81,
674,
12,
3459,
16,
16640,
2165,
803,
16,
6283,
67,
9076,
16,
4500,
67,
7526,
67,
7722,
785,
4672,
9163,
1994,
490,
2664,
585,
26418,
1172,
2932,
10561,
1546,
16,
3459,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1262,
67,
81,
674,
12,
3459,
16,
16640,
2165,
803,
16,
6283,
67,
9076,
16,
4500,
67,
7526,
67,
7722,
785,
4672,
9163,
1994,
490,
2664,
585,
26418,
1172,
2932,
10561,
1546,
16,
3459,
10... |
self.config.read('sdi.conf') | self.config.read(self.conffilepath) | def __init__(self, conf='sdi.conf'): # define default variable values self.defaults = { 'general': {'prefix': '.', 'cmd dir': '%(prefix)s/cmds', 'cmd general': '%(cmd dir)s/general', 'data dir': '%(prefix)s/data', 'tmp dir': '/tmp/sdi', 'pid dir': '%(tmp dir)s/pids', 'pid dir sys': '%(pid dir)s/system', 'pid dir hosts': '%(pid dir)s/hosts', 'shooks': '%(prefix)s/states-enabled', 'launch delay': '0.05', 'kill tout': '30', 'log': '%(prefix)s/sdi.log', 'hooks': '%(prefix)s/commands-enabled', 'fifo dir': '%(tmp dir)s/fifos', 'socket port': '18193', 'sfifo': '%(fifo dir)s/states.fifo'}, 'ssh': {'sdiuser': 'root', 'timeout': '240', 'ssh port': '22', 'sshopt[0]': 'PreferredAuthentications=publickey', 'sshopt[1]': 'StrictHostKeychecking=no', 'sshopt[2]': 'ConnectTimeout=%(timeout)s', 'sshopt[3]': 'TCPKeepAlive=yes', 'sshopt[4]': 'ServerAliveCountMax=3', 'sshopt[5]': 'ServerAliveInterval=100'}, 'web': {'web mode': 'true', 'sdi web': 'sdiweb', 'classes dir': 'CLASSES', 'class name': 'MACHINES', 'wwwdir': 'www', 'host columnname': 'Hostname', 'default columns': 'Hostname,Uptime,Status'}, 'send file': {'send limit': '1'} } | daccb7dc553a79fad53824906951bb0a6846eef4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/189/daccb7dc553a79fad53824906951bb0a6846eef4/configsdiparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2195,
2218,
87,
3211,
18,
3923,
11,
4672,
468,
4426,
805,
2190,
924,
365,
18,
7606,
273,
288,
296,
12259,
4278,
282,
13666,
3239,
4278,
2611,
16,
296,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2195,
2218,
87,
3211,
18,
3923,
11,
4672,
468,
4426,
805,
2190,
924,
365,
18,
7606,
273,
288,
296,
12259,
4278,
282,
13666,
3239,
4278,
2611,
16,
296,
41... |
self.__sendMarks( rpcClient, acMarks ) def __sendFailed( self, rpcClient ): while len( self.failedTransmissions ) > 100: self.failedTransmissions.pop(0) while len( self.failedTransmissions ) > 0: transTuple = self.failedTransmissions[0] | self.dataToSend.append( ( self.__sendMarks, acMarks ) ) self.__flushQueue( rpcClient ) def __flushQueue( self, rpcClient ): while len( self.dataToSend ) > 100: self.dataToSend.pop(0) while len( self.dataToSend ) > 0: transTuple = self.dataToSend[0] | def __sendData( self, acRegister, acMarks, secsTimeout = 30 ): if not self.enabled: return if gServiceInterface.serviceRunning(): rpcClient = gServiceInterface else: rpcClient = RPCClient( "Monitoring/Server", timeout = secsTimeout ) if not self.__sendFailed( rpcClient ): return if len( acRegister ): if not self.__sendRegistration( rpcClient, acRegister ): self.failedTransmissions.append( ( self.__sendMarks, acMarks ) ) return if len( acMarks ): self.__sendMarks( rpcClient, acMarks ) | c872849929ead616d00759c5a1e40b1ca4f8417b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/c872849929ead616d00759c5a1e40b1ca4f8417b/MonitoringClient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4661,
751,
12,
365,
16,
1721,
3996,
16,
1721,
20981,
16,
18043,
2694,
273,
5196,
262,
30,
309,
486,
365,
18,
5745,
30,
327,
309,
314,
18348,
18,
3278,
7051,
13332,
6724,
1227,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4661,
751,
12,
365,
16,
1721,
3996,
16,
1721,
20981,
16,
18043,
2694,
273,
5196,
262,
30,
309,
486,
365,
18,
5745,
30,
327,
309,
314,
18348,
18,
3278,
7051,
13332,
6724,
1227,
27... |
self.view_list.set_active(self.VIEW_VIRTUAL_LISTS) | def onPreflListSelect(self, *args): self.view_list.set_active(self.VIEW_VIRTUAL_LISTS) self.currentListMap = self.prefModel.getSelected() if self.currentListMap in self.prefListMap: beans = self.prefListMap[self.currentListMap] self.display_virtual(beans) else: self.clear() | 677bd2dda48dbce520a45e43abb22dd3c6271c1c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/677bd2dda48dbce520a45e43abb22dd3c6271c1c/directory_controller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
1386,
2242,
682,
3391,
12,
2890,
16,
380,
1968,
4672,
225,
365,
18,
2972,
682,
863,
273,
365,
18,
25724,
1488,
18,
588,
7416,
1435,
225,
309,
365,
18,
2972,
682,
863,
316,
365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
1386,
2242,
682,
3391,
12,
2890,
16,
380,
1968,
4672,
225,
365,
18,
2972,
682,
863,
273,
365,
18,
25724,
1488,
18,
588,
7416,
1435,
225,
309,
365,
18,
2972,
682,
863,
316,
365,
... | |
pre.append(align_prepost[is_inline, attrs['align']][0]) post.append(align_prepost[is_inline, attrs['align']][1]) | align_code = align_codes[attrs['align']] pre.append(align_code[0]) post.append(align_code[1]) | def visit_image(self, node): self.requirements['graphicx'] = self.graphicx_package attrs = node.attributes # Add image URI to dependency list, assuming that it's # referring to a local file. self.settings.record_dependencies.add(attrs['uri']) # alignment defaults: if not 'align' in attrs: # Set default align of image in a figure to 'center' if isinstance(node.parent, nodes.figure): attrs['align'] = 'center' # query 'align-*' class argument for cls in node['classes']: if cls.startswith('align-'): attrs['align'] = cls.split('-')[1] # pre- and postfix (prefix inserted in reverse order) pre = [] post = [] include_graphics_options = [] is_inline = self.is_inline(node) align_prepost = { # key == (<is_inline>, <align>) # By default latex aligns the bottom of an image. (True, 'bottom'): ('', ''), (True, 'middle'): (r'\raisebox{-0.5\height}{', '}'), (True, 'top'): (r'\raisebox{-\height}{', '}'), (False, 'center'): (r'\noindent\makebox[\textwidth][c]{', '}'), (False, 'left'): (r'\noindent{', r'\hfill}'), (False, 'right'): (r'\noindent{\hfill', '}'),} if 'align' in attrs: try: pre.append(align_prepost[is_inline, attrs['align']][0]) post.append(align_prepost[is_inline, attrs['align']][1]) except KeyError: pass # TODO: warn? if 'height' in attrs: include_graphics_options.append('height=%s' % self.to_latex_length(attrs['height'])) if 'scale' in attrs: include_graphics_options.append('scale=%f' % (attrs['scale'] / 100.0)) ## # Could also be done with ``scale`` option to ## # ``\includegraphics``; doing it this way for consistency. ## pre.append('\\scalebox{%f}{' % (attrs['scale'] / 100.0,)) ## post.append('}') if 'width' in attrs: include_graphics_options.append('width=%s' % self.to_latex_length(attrs['width'])) if not is_inline: pre.append('\n') post.append('\n') pre.reverse() self.out.extend(pre) self.append_hypertargets(node) options = '' if include_graphics_options: options = '[%s]' % (','.join(include_graphics_options)) self.out.append('\\includegraphics%s{%s}' % (options, attrs['uri'])) self.out.extend(post) | 4d433b8e438a145ac037d2160decc5abe210ca46 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5620/4d433b8e438a145ac037d2160decc5abe210ca46/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
365,
18,
16175,
3292,
4660,
335,
92,
3546,
273,
365,
18,
4660,
335,
92,
67,
5610,
3422,
273,
756,
18,
4350,
468,
1436,
1316,
3699,
358,
4904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
2730,
12,
2890,
16,
756,
4672,
365,
18,
16175,
3292,
4660,
335,
92,
3546,
273,
365,
18,
4660,
335,
92,
67,
5610,
3422,
273,
756,
18,
4350,
468,
1436,
1316,
3699,
358,
4904,
... |
self._determineTrovesToClone(cloneMap, cloneJob, troveCache, callback) | if cloneOnlyByDefaultTroves: self._setByDefaultMap(cloneMap, troveCache) self._determineTrovesToClone(cloneMap, cloneJob, troveCache) | def _createCloneChangeSet(self, cloneMap, updateBuildInfo=True, message=DEFAULT_MESSAGE, infoOnly=False, callback=None, trackClone=True): if callback is None: callback = callbacks.CloneCallback() callback.determiningCloneTroves() troveCache = TroveCache(self.repos) | 48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/48090a0a611c5a2a32181ce3ce6d2db11fdc4a5e/clone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
10930,
21565,
12,
2890,
16,
3236,
863,
16,
1089,
3116,
966,
33,
5510,
16,
883,
33,
5280,
67,
8723,
16,
1123,
3386,
33,
8381,
16,
1348,
33,
7036,
16,
3298,
10930,
33,
5510,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
10930,
21565,
12,
2890,
16,
3236,
863,
16,
1089,
3116,
966,
33,
5510,
16,
883,
33,
5280,
67,
8723,
16,
1123,
3386,
33,
8381,
16,
1348,
33,
7036,
16,
3298,
10930,
33,
5510,
... |
f = file(fname) | f = open(fname) | def combine(fname): f = file(fname) fi = iter(f) for line in read(fi, re.compile(r'^Remaining objects:$'), False): pass crack = re.compile(r'([a-zA-Z\d]+) \[(\d+)\] (.*)') addr2rc = {} addr2guts = {} before = 0 for line in read(fi, re.compile(r'^Remaining object addresses:$'), False): m = crack.match(line) if m: addr, addr2rc[addr], addr2guts[addr] = m.groups() before += 1 else: print('??? skipped:', line) after = 0 for line in read(fi, crack, True): after += 1 m = crack.match(line) assert m addr, rc, guts = m.groups() # guts is type name here if addr not in addr2rc: print('??? new object created while tearing down:', line.rstrip()) continue print(addr, end=' ') if rc == addr2rc[addr]: print('[%s]' % rc, end=' ') else: print('[%s->%s]' % (addr2rc[addr], rc), end=' ') print(guts, addr2guts[addr]) f.close() print("%d objects before, %d after" % (before, after)) | d5620f4b985f9cbce5cf7dc2a88abc84bc2f8f17 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/d5620f4b985f9cbce5cf7dc2a88abc84bc2f8f17/combinerefs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8661,
12,
12749,
4672,
284,
273,
1696,
12,
12749,
13,
225,
7314,
273,
1400,
12,
74,
13,
225,
364,
980,
316,
855,
12,
22056,
16,
283,
18,
11100,
12,
86,
19856,
11429,
2184,
30,
9227,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8661,
12,
12749,
4672,
284,
273,
1696,
12,
12749,
13,
225,
7314,
273,
1400,
12,
74,
13,
225,
364,
980,
316,
855,
12,
22056,
16,
283,
18,
11100,
12,
86,
19856,
11429,
2184,
30,
9227,
... |
@return: S_OK,S_ERROR | def getPhysicalFileMetadata(self,pfn,storageElement,printOutput=False): """Allows to retrieve metadata for physical file(s) on a supplied storage element. Contacts the site SRM endpoint and performs a gfal_ls behind the scenes. | 2762b06242602a0ca2e8c502d626d42c8ff88c1b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/2762b06242602a0ca2e8c502d626d42c8ff88c1b/Dirac.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21735,
7046,
812,
2277,
12,
2890,
16,
84,
4293,
16,
5697,
1046,
16,
1188,
1447,
33,
8381,
4672,
3536,
19132,
358,
4614,
1982,
364,
11640,
585,
12,
87,
13,
603,
279,
4580,
2502,
930,
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,
21735,
7046,
812,
2277,
12,
2890,
16,
84,
4293,
16,
5697,
1046,
16,
1188,
1447,
33,
8381,
4672,
3536,
19132,
358,
4614,
1982,
364,
11640,
585,
12,
87,
13,
603,
279,
4580,
2502,
930,
18... | |
return self._idType(value) | return cls._idType(value) | def coerceID(cls, value): if isinstance(value, cls): return value.id else: return self._idType(value) | de0bfefffd7d20eb72c686a227c1003ba940a12c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6718/de0bfefffd7d20eb72c686a227c1003ba940a12c/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12270,
734,
12,
6429,
16,
460,
4672,
309,
1549,
12,
1132,
16,
2028,
4672,
327,
460,
18,
350,
469,
30,
327,
365,
6315,
350,
559,
12,
1132,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12270,
734,
12,
6429,
16,
460,
4672,
309,
1549,
12,
1132,
16,
2028,
4672,
327,
460,
18,
350,
469,
30,
327,
365,
6315,
350,
559,
12,
1132,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if not window or eventName == "switchEnd": | isWindow = winUser.isWindow(window) if not window or eventName == "switchEnd" or (not isWindow and eventName == "menuEnd"): | def winEventCallback(handle,eventID,window,objectID,childID,threadID,timestamp): try: focusObject=api.getFocusObject() foregroundObject=api.getForegroundObject() desktopObject=api.getDesktopObject() navigatorObject=api.getNavigatorObject() mouseObject=api.getMouseObject() eventName=eventMap[eventID] #Change window objIDs to client objIDs for better reporting of objects if (objectID==0) and (childID==0): objectID=OBJID_CLIENT #Remove any objects that are being hidden or destroyed if eventName in ["hide","destroy"]: if isinstance(focusObject,NVDAObjects.IAccessible.IAccessible) and (window==focusObject.event_windowHandle) and (objectID==focusObject.event_objectID) and (childID==focusObject.event_childID): try: parent=api.getFocusAncestors()[-1] except: parent=desktopObject globalVars.focusObject=parent api.setMouseObject(desktopObject) return elif isinstance(foregroundObject,NVDAObjects.IAccessible.IAccessible) and (window==foregroundObject.event_windowHandle) and (objectID==foregroundObject.event_objectID) and (childID==foregroundObject.event_childID): api.setForegroundObject(desktopObject) api.setMouseObject(desktopObject) api.setNavigatorObject(desktopObject) return #Ignore any other destroy events since the object does not exist if eventName=="destroy": return #Ignore events with invalid window handles if not window or eventName == "switchEnd": window=winUser.getDesktopWindow() elif not winUser.isWindow(window): return windowClassName=winUser.getClassName(window) controlID=winUser.getControlID(window) if windowClassName.startswith('Mozilla') and eventName in ("show","hide","reorder"): return #A hack to fix a bug in Notepad++ where focus is constantly given to some strange list if eventID==winUser.EVENT_OBJECT_FOCUS and controlID==30002 and winUser.getClassName(winUser.getAncestor(window,winUser.GA_ROOTOWNER))=="Notepad++": return if objectID==OBJID_CARET and eventName=="locationChange": if window==focusObject.event_windowHandle and isinstance(focusObject,NVDAObjects.IAccessible.IAccessible): eventName="caret" objectID=focusObject.event_objectID childID=focusObject.IAccessibleChildID else: return #Report mouse shape changes if (eventID==winUser.EVENT_OBJECT_NAMECHANGE) and (objectID==OBJID_CURSOR): if not config.conf["mouse"]["reportMouseShapeChanges"]: return obj=NVDAObjects.IAccessible.getNVDAObjectFromEvent(winUser.getDesktopWindow(),OBJID_CURSOR,0) if obj: queueHandler.queueFunction(queueHandler.eventQueue,mouseHandler.updateMouseShape,obj.name) return #Process focus events elif eventName=="gainFocus": if focusEventQueue.full(): focusEventQueue.get() focusEventQueue.put((eventCounter.next(),window,objectID,childID)) return elif eventName.endswith("Change") or eventName in ("reorder","caret"): propertyChangeEventCache[(eventName,window,objectID,childID)]=eventCounter.next() return #Its a generic event which should just be queued with eventLock: heapq.heappush(eventHeap,(eventCounter.next(),eventName,window,objectID,childID)) except: globalVars.log.error("winEventCallback", exc_info=True) | 7878c7d7f61ead463b4922269fb1f2334a749b7f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/7878c7d7f61ead463b4922269fb1f2334a749b7f/IAccessibleHandler.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5657,
1133,
2428,
12,
4110,
16,
2575,
734,
16,
5668,
16,
1612,
734,
16,
3624,
734,
16,
5930,
734,
16,
5508,
4672,
775,
30,
7155,
921,
33,
2425,
18,
588,
9233,
921,
1435,
16231,
921,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5657,
1133,
2428,
12,
4110,
16,
2575,
734,
16,
5668,
16,
1612,
734,
16,
3624,
734,
16,
5930,
734,
16,
5508,
4672,
775,
30,
7155,
921,
33,
2425,
18,
588,
9233,
921,
1435,
16231,
921,
... |
def spillproperties(msg, attrs, predicate): | def spilldescriptors(msg, attrs, predicate): | def spillproperties(msg, attrs, predicate): ok, attrs = _split_list(attrs, predicate) if ok: hr.maybe() push(msg) for name, kind, homecls, value in ok: push(self._docproperty(name, value, mod)) return attrs | 210cc240dc7573286fe4f4380906712aae9b9a70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/210cc240dc7573286fe4f4380906712aae9b9a70/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1694,
737,
72,
8379,
12,
3576,
16,
3422,
16,
5641,
4672,
1529,
16,
3422,
273,
389,
4939,
67,
1098,
12,
7039,
16,
5641,
13,
309,
1529,
30,
15407,
18,
19133,
1435,
1817,
12,
3576,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1694,
737,
72,
8379,
12,
3576,
16,
3422,
16,
5641,
4672,
1529,
16,
3422,
273,
389,
4939,
67,
1098,
12,
7039,
16,
5641,
13,
309,
1529,
30,
15407,
18,
19133,
1435,
1817,
12,
3576,
13,
... |
config.set("Settings","signal_display_type",value) | config.set("Settings","signal_display_type",int(value)) | def SetSignalDisplayType(self, value): ''' Sets the signal display type and writes it the wicd config file ''' config = ConfigParser.ConfigParser() config.read(self.app_conf) config.set("Settings","signal_display_type",value) configfile = open(self.app_conf,"w") config.write(configfile) self.signal_display_type = value | 98f99904912581947e2626a9cc9f8cb66edb2a95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/353/98f99904912581947e2626a9cc9f8cb66edb2a95/daemon.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
11208,
4236,
559,
12,
2890,
16,
460,
4672,
9163,
11511,
326,
4277,
2562,
618,
471,
7262,
518,
326,
341,
335,
72,
642,
585,
9163,
642,
273,
25076,
18,
809,
2678,
1435,
642,
18,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11208,
4236,
559,
12,
2890,
16,
460,
4672,
9163,
11511,
326,
4277,
2562,
618,
471,
7262,
518,
326,
341,
335,
72,
642,
585,
9163,
642,
273,
25076,
18,
809,
2678,
1435,
642,
18,
89... |
def _get_tmpfile_from_server(self, local_file,remote_file): | def _get_tmpfile_from_server(self, local_file=None,remote_file=None): | def _get_tmpfile_from_server(self, local_file,remote_file): if local_file is None: local_file = self._local_tmpfile() if remote_file is None: remote_file = self._remote_tmpfile() cmd = 'scp %s:"%s" "%s" 1>&2 2>/dev/null'%( self._server, remote_file, local_file) | ba897deade7c62ed82f1017173c551bfa2b24545 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/ba897deade7c62ed82f1017173c551bfa2b24545/expect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5645,
768,
67,
2080,
67,
3567,
12,
2890,
16,
1191,
67,
768,
33,
7036,
16,
7222,
67,
768,
33,
7036,
4672,
309,
1191,
67,
768,
353,
599,
30,
1191,
67,
768,
273,
365,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
5645,
768,
67,
2080,
67,
3567,
12,
2890,
16,
1191,
67,
768,
33,
7036,
16,
7222,
67,
768,
33,
7036,
4672,
309,
1191,
67,
768,
353,
599,
30,
1191,
67,
768,
273,
365,
63... |
self._opener = urllib2.build_opener(*handlers) | if self.opts.cache_openers: self._opener = CachedOpenerDirector(*handlers) else: self._opener = urllib2.build_opener(*handlers) | def _get_opener(self): """Build a urllib2 OpenerDirector based on request options.""" if self.opts.opener: return self.opts.opener elif self._opener is None: handlers = [] # if you specify a ProxyHandler when creating the opener # it _must_ come before all other handlers in the list or urllib2 # chokes. if self.opts.proxies: handlers.append( CachedProxyHandler(self.opts.proxies) ) if keepalive_handler and self.opts.keepalive: handlers.append( keepalive_handler ) if range_handlers and (self.opts.range or self.opts.reget): handlers.extend( range_handlers ) handlers.append( auth_handler ) # Temporarily disabling this because it doesn't yet work # correctly. Some reget tests fail. I really don't understand # why, but some of the error handlers aren't set correctly. #self._opener = CachedOpenerDirector(*handlers) self._opener = urllib2.build_opener(*handlers) # OK, I don't like to do this, but otherwise, we end up with # TWO user-agent headers. self._opener.addheaders = [] return self._opener | ff9e21d416dc5939b4d44c8c750100b1086d4d4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7001/ff9e21d416dc5939b4d44c8c750100b1086d4d4e/grabber.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
25098,
12,
2890,
4672,
3536,
3116,
279,
11527,
22,
6066,
708,
28280,
2511,
603,
590,
702,
12123,
309,
365,
18,
4952,
18,
25098,
30,
327,
365,
18,
4952,
18,
25098,
1327,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
25098,
12,
2890,
4672,
3536,
3116,
279,
11527,
22,
6066,
708,
28280,
2511,
603,
590,
702,
12123,
309,
365,
18,
4952,
18,
25098,
30,
327,
365,
18,
4952,
18,
25098,
1327,
3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.