rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
Makefile = Makefile + "BUILD_HTML = xsltproc --param quiet 1 --maxdepth 100 " + XSLT_PARAMS + ' ' + config.xslt_html + ' ' + xmlfile + ' > ' + htmlfile + " 2>>xsltproc.log\n" Makefile = Makefile + "BUILD_INDEX = xsltproc --param quiet 1 --maxdepth 100 " + XSLT_PARAMS + ' ' + config.xslt_chunk + ' ' + xmlfile + " 2>>xsltproc.log\n" | Makefile = Makefile + "BUILD_HTML = xsltproc --param quiet 1 --maxdepth 100 " + XSLTPROC_PARAMS + ' ' + config.xslt_html + ' ' + xmlfile + ' > ' + htmlfile + " 2>>xsltproc.log\n" Makefile = Makefile + "BUILD_INDEX = xsltproc --param quiet 1 --maxdepth 100 " + XSLTPROC_PARAMS + ' ' + config.xslt_chunk + ' ' + xmlfile + " 2>>xsltproc.log\n" | def write_makefile(self, doc, dir): """ Writes a Makefile to convert the source files into DocBook XML. """ | 68101eabe5567ccb8fd8c0e6e6729be05b3b42d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1319/68101eabe5567ccb8fd8c0e6e6729be05b3b42d8/Makefile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
6540,
768,
12,
2890,
16,
997,
16,
1577,
4672,
3536,
30053,
279,
4344,
768,
358,
1765,
326,
1084,
1390,
1368,
3521,
9084,
3167,
18,
3536,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
6540,
768,
12,
2890,
16,
997,
16,
1577,
4672,
3536,
30053,
279,
4344,
768,
358,
1765,
326,
1084,
1390,
1368,
3521,
9084,
3167,
18,
3536,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
np.add(tmp[0:ch.point_count], 0, ch.raw_data) | np.add(tmp, 0, ch.raw_data) | def __read_data_uncompressed(self, channels): # The data in the file are interleaved, so we'll potentially have # a different amount of data to read at each time slice. # It's possible we won't have any data for some time slices, I think. # The BIOPAC engineers tell you not to even try reading interleaved # data. Wusses. | b21ff03eda02cef47fdda00ed2826ce08b230db6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14571/b21ff03eda02cef47fdda00ed2826ce08b230db6/readers.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
896,
67,
892,
67,
551,
362,
10906,
12,
2890,
16,
5750,
4672,
468,
1021,
501,
316,
326,
585,
854,
1554,
22593,
16,
1427,
732,
5614,
13935,
1240,
468,
279,
3775,
3844,
434,
501,
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,
1001,
896,
67,
892,
67,
551,
362,
10906,
12,
2890,
16,
5750,
4672,
468,
1021,
501,
316,
326,
585,
854,
1554,
22593,
16,
1427,
732,
5614,
13935,
1240,
468,
279,
3775,
3844,
434,
501,
35... |
if self._authorizeUser( user | if self._authorizeUser( user | def validate( self, request, auth='', roles=_noroles ): | 614e1161e47ef43710a900ca047bf9c4b146dbfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/614e1161e47ef43710a900ca047bf9c4b146dbfb/PluggableAuthService.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1954,
12,
365,
16,
590,
16,
1357,
2218,
2187,
4900,
33,
67,
29561,
9112,
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,
... | [
1,
1,
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,
1954,
12,
365,
16,
590,
16,
1357,
2218,
2187,
4900,
33,
67,
29561,
9112,
262,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
for file_ in k: if dc[file_][3] == -1: | for file_, ent in k: if ent[3] == -1: | def debugstate(ui, repo): """show the contents of the current dirstate""" dc = repo.dirstate._map k = dc.keys() k.sort() for file_ in k: if dc[file_][3] == -1: # Pad or slice to locale representation locale_len = len(time.strftime("%x %X", time.localtime(0))) timestr = 'unset' timestr = timestr[:locale_len] + ' '*(locale_len - len(timestr)) else: timestr = time.strftime("%x %X", time.localtime(dc[file_][3])) ui.write("%c %3o %10d %s %s\n" % (dc[file_][0], dc[file_][1] & 0777, dc[file_][2], timestr, file_)) for f in repo.dirstate.copies(): ui.write(_("copy: %s -> %s\n") % (repo.dirstate.copied(f), f)) | 37d6e5c089fe87b240c07b70ebb79481d52ede62 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/37d6e5c089fe87b240c07b70ebb79481d52ede62/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
2019,
12,
4881,
16,
3538,
4672,
3536,
4500,
326,
2939,
434,
326,
783,
302,
920,
340,
8395,
6744,
273,
3538,
18,
72,
920,
340,
6315,
1458,
417,
273,
6744,
18,
2452,
1435,
417,
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,
1198,
2019,
12,
4881,
16,
3538,
4672,
3536,
4500,
326,
2939,
434,
326,
783,
302,
920,
340,
8395,
6744,
273,
3538,
18,
72,
920,
340,
6315,
1458,
417,
273,
6744,
18,
2452,
1435,
417,
18,... |
r""" Right pads x such that \code{len(x)} is $n$. EXAMPLE: | """ Right pads ``x`` such that ``len(x) == n``. EXAMPLE:: | def _rpad(self,x, n=None): r""" Right pads x such that \code{len(x)} is $n$. | 16527da1ddc0ac750f609cd58858c5b45d932696 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/16527da1ddc0ac750f609cd58858c5b45d932696/sbox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
86,
6982,
12,
2890,
16,
92,
16,
290,
33,
7036,
4672,
436,
8395,
13009,
4627,
87,
619,
4123,
716,
521,
710,
95,
1897,
12,
92,
16869,
353,
271,
82,
8,
18,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
86,
6982,
12,
2890,
16,
92,
16,
290,
33,
7036,
4672,
436,
8395,
13009,
4627,
87,
619,
4123,
716,
521,
710,
95,
1897,
12,
92,
16869,
353,
271,
82,
8,
18,
2,
-100,
-100,
-100,
-... |
self.rendererSpriteFileEntry['background'] = 'SystemWindow' self.rendererSpriteNodeEntry['background'] = 'SystemWindow' | self.rendererSpriteFileEntry['background'] = ' self.rendererSpriteNodeEntry['background'] = ' | def setSpriteSourceType(self): if self.rendererSpriteSourceType.get() == SpriteParticleRenderer.STTexture: self.rendererSpriteTextureEntry['state'] = 'normal' self.rendererSpriteFileEntry['state'] = 'disabled' self.rendererSpriteNodeEntry['state'] = 'disabled' self.rendererSpriteTextureEntry['background'] = 'SystemWindow' self.rendererSpriteFileEntry['background'] = '#C0C0C0' self.rendererSpriteNodeEntry['background'] = '#C0C0C0' else: self.rendererSpriteTextureEntry['state'] = 'disabled' self.rendererSpriteFileEntry['state'] = 'normal' self.rendererSpriteNodeEntry['state'] = 'normal' self.rendererSpriteTextureEntry['background'] = '#C0C0C0' self.rendererSpriteFileEntry['background'] = 'SystemWindow' self.rendererSpriteNodeEntry['background'] = 'SystemWindow' | 9b6710fc36e55c6430b862714a8d9f8850d5b5bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/9b6710fc36e55c6430b862714a8d9f8850d5b5bc/ParticlePanel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
3389,
796,
1830,
559,
12,
2890,
4672,
309,
365,
18,
14374,
3389,
796,
1830,
559,
18,
588,
1435,
422,
5878,
796,
1988,
3711,
6747,
18,
882,
10967,
30,
365,
18,
14374,
3389,
796,
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,
444,
3389,
796,
1830,
559,
12,
2890,
4672,
309,
365,
18,
14374,
3389,
796,
1830,
559,
18,
588,
1435,
422,
5878,
796,
1988,
3711,
6747,
18,
882,
10967,
30,
365,
18,
14374,
3389,
796,
10... |
start_response('302 Found', [('Location', join(PROXY_URL, unquote(value)))]) | start_response('302 Found', [('Location', join(proxy_url, unquote(value)))]) | def application(env, start_response): method = env['REQUEST_METHOD'] path = env['PATH_INFO'] if env['QUERY_STRING']: path += '?' + env['QUERY_STRING'] path = path.lstrip('/') if (method, path) == ('GET', ''): start_response('200 OK', [('Content-Type', 'text/html')]) return [FORM] elif method == 'GET': return proxy(path, start_response) elif (method, path) == ('POST', ''): key, value = env['wsgi.input'].read().strip().split('=') assert key == 'url', repr(key) start_response('302 Found', [('Location', join(PROXY_URL, unquote(value)))]) elif method == 'POST': start_response('404 Not Found', []) else: start_response('501 Not Implemented', []) return [] | 41d4fdf063ac1ac186151dccc6ff66c513100c2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10423/41d4fdf063ac1ac186151dccc6ff66c513100c2a/webproxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2521,
12,
3074,
16,
787,
67,
2740,
4672,
707,
273,
1550,
3292,
5519,
67,
5327,
3546,
589,
273,
1550,
3292,
4211,
67,
5923,
3546,
309,
1550,
3292,
10753,
67,
5804,
3546,
30,
589,
1011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2521,
12,
3074,
16,
787,
67,
2740,
4672,
707,
273,
1550,
3292,
5519,
67,
5327,
3546,
589,
273,
1550,
3292,
4211,
67,
5923,
3546,
309,
1550,
3292,
10753,
67,
5804,
3546,
30,
589,
1011,
... |
if selection_params_unchanged: self.updateListWidgets() return | self.updateListWidgets() return | def _update_UI_do_updates(self): """ Overrides superclass method. @see: Command_PropertyManager._update_UI_do_updates() """ newSelectionParams = self._currentSelectionParams() current_struct_params = self._currentStructureParams() selection_params_unchanged = same_vals(newSelectionParams, self._previousSelectionParams) #introducing self._previousStructureParams and #adding structure_params_unchanged check to the 'if' condition below #fixes bug 2910. structure_params_unchanged = same_vals(self._previousStructureParams, current_struct_params) current_command_stack_params = self._currentCommandStackParams() #Check if command stack params changed since last call of this #PM update method. This is used to fix bugs like 2940 command_stack_params_unchanged = same_vals( self._previousCommandStackParams, current_command_stack_params) #No need to proceed if any of the selection/ structure and commandstack #parameters remained unchanged since last call. --- [CONDITION A] if selection_params_unchanged and structure_params_unchanged and command_stack_params_unchanged: #This second condition above fixes bug 2888 return self._previousStructureParams = current_struct_params self._previousSelectionParams = newSelectionParams self._previousCommandStackParams = current_command_stack_params ##if not selection_params_unchanged or not command_stack_params_unchanged and structure_params_unchanged: if structure_params_unchanged: #NOTE: We checked if either of the selection struct or command stack #parameters or both changed. (this was referred as '[CONDITION A]' #above). So, this condition (structure_params_unchanged)also means #either selection or command stack or both parameters were changed. if not command_stack_params_unchanged: #update the list widgets *before* updating the selection if #the command stack changed. This ensures that the selection box #appears around the list widget items that are selected. self.updateListWidgets() selectedStrands, selectedSegments = newSelectionParams self.strandListWidget.updateSelection(selectedStrands) self.segmentListWidget.updateSelection(selectedSegments) if len(selectedStrands) == 1: self.editStrandPropertiesButton.setEnabled(True) else: self.editStrandPropertiesButton.setEnabled(False) if len(selectedSegments) == 1: self.editSegmentPropertiesButton.setText("Edit Properties...") self.editSegmentPropertiesButton.setEnabled(True) elif len(selectedSegments) > 1: resizeString = "Resize Selected Segments (%d)..." % len(selectedSegments) self.editSegmentPropertiesButton.setText(resizeString) self.editSegmentPropertiesButton.setEnabled(True) self.searchForCrossoversButton.setEnabled(True) else: self.editSegmentPropertiesButton.setText("Edit Properties...") self.editSegmentPropertiesButton.setEnabled(False) self.searchForCrossoversButton.setEnabled(False) return ##if not structure_params_unchanged or not command_stack_params_unchanged: if selection_params_unchanged: #Fixes bug 2940 #Thies means either stuct params or command stack params or both were #changed. (Because we checked '[CONDITION A]' at the beginning) self.updateListWidgets() return | 2c3109b4967e8fcb136d3fc52f699fdad0890acc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/2c3109b4967e8fcb136d3fc52f699fdad0890acc/BuildDna_PropertyManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
67,
5370,
67,
2896,
67,
14703,
12,
2890,
4672,
3536,
531,
9857,
12098,
707,
18,
632,
5946,
30,
3498,
67,
1396,
1318,
6315,
2725,
67,
5370,
67,
2896,
67,
14703,
1435,
3536,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2725,
67,
5370,
67,
2896,
67,
14703,
12,
2890,
4672,
3536,
531,
9857,
12098,
707,
18,
632,
5946,
30,
3498,
67,
1396,
1318,
6315,
2725,
67,
5370,
67,
2896,
67,
14703,
1435,
3536,
2... |
iuser="(%s)" % (user,) | iuser="(%s)" % (iuser,) | def irc_cmd_MODE(self,prefix,command,params): | f9a6433480d6fcaea7760f3479ab20ed5237b074 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12751/f9a6433480d6fcaea7760f3479ab20ed5237b074/jjigw.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
277,
1310,
67,
4172,
67,
7038,
12,
2890,
16,
3239,
16,
3076,
16,
2010,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
277,
1310,
67,
4172,
67,
7038,
12,
2890,
16,
3239,
16,
3076,
16,
2010,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
suffixes = [".py", ".pyc", ".pyo"] | suffixes = [] for triple in imp.get_suffixes(): suffixes.append(triple[0]) | def find_all_submodules(self, m): if not m.__path__: return modules = {} suffixes = [".py", ".pyc", ".pyo"] for dir in m.__path__: try: names = os.listdir(dir) except os.error: self.msg(2, "can't list directory", dir) continue for name in names: mod = None for suff in suffixes: n = len(suff) if name[-n:] == suff: mod = name[:-n] break if mod and mod != "__init__": modules[mod] = mod return modules.keys() | 8bed0b57a1eeb3e3bdd586c0a716e092ef8b5b9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/8bed0b57a1eeb3e3bdd586c0a716e092ef8b5b9d/modulefinder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
454,
67,
1717,
6400,
12,
2890,
16,
312,
4672,
309,
486,
312,
16186,
803,
972,
30,
327,
4381,
273,
2618,
565,
18333,
273,
5378,
364,
14543,
316,
1646,
18,
588,
67,
8477,
281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
67,
454,
67,
1717,
6400,
12,
2890,
16,
312,
4672,
309,
486,
312,
16186,
803,
972,
30,
327,
4381,
273,
2618,
565,
18333,
273,
5378,
364,
14543,
316,
1646,
18,
588,
67,
8477,
281,
... |
ds = self.opener("dirstate").read() | try: ds = self.opener("dirstate").read() except IOError: ds = "" | def transaction(self): # save dirstate for undo ds = self.opener("dirstate").read() self.opener("undo.dirstate", "w").write(ds) return transaction.transaction(self.opener, self.join("journal"), self.join("undo")) | 4a000fcea3cb926de66564b9bdcc32d0ac56d81a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/4a000fcea3cb926de66564b9bdcc32d0ac56d81a/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2492,
12,
2890,
4672,
468,
1923,
302,
920,
340,
364,
15436,
775,
30,
3780,
273,
365,
18,
25098,
2932,
72,
920,
340,
20387,
896,
1435,
1335,
8340,
30,
3780,
273,
1408,
365,
18,
25098,
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,
2492,
12,
2890,
4672,
468,
1923,
302,
920,
340,
364,
15436,
775,
30,
3780,
273,
365,
18,
25098,
2932,
72,
920,
340,
20387,
896,
1435,
1335,
8340,
30,
3780,
273,
1408,
365,
18,
25098,
2... |
except AttributeError: pass else: raise TestFailed, 'expected AttributeError' | except AttributeError: pass else: raise TestFailed, 'expected AttributeError' | def b(): 'my docstring' pass | 92e56246efd9ad85e3b3f20a7d925f31d1625b00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/92e56246efd9ad85e3b3f20a7d925f31d1625b00/test_funcattrs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
13332,
296,
4811,
14525,
11,
1342,
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,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
13332,
296,
4811,
14525,
11,
1342,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Here is a curve with two-torsion, so here the algorithm gives bounds on the rank:: | Here is a curve with two-torsion, so here the bounds given by the algorithm do not uniquely determine the rank:: | def rank(self,verbose=0, lim1=5, lim3=50, limtriv=10, maxprob=20, limbigprime=30): r""" Return the rank of this elliptic curve, if it can be determined. | 16c5d6f4b590776892987400ecee6a836886ccbb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/16c5d6f4b590776892987400ecee6a836886ccbb/ell_number_field.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6171,
12,
2890,
16,
11369,
33,
20,
16,
20167,
21,
33,
25,
16,
20167,
23,
33,
3361,
16,
20167,
313,
427,
33,
2163,
16,
943,
7748,
33,
3462,
16,
20167,
14002,
16382,
33,
5082,
4672,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6171,
12,
2890,
16,
11369,
33,
20,
16,
20167,
21,
33,
25,
16,
20167,
23,
33,
3361,
16,
20167,
313,
427,
33,
2163,
16,
943,
7748,
33,
3462,
16,
20167,
14002,
16382,
33,
5082,
4672,
43... |
if markerKey is not None: cmd = cmd + 'and _Marker_key = %s\n' % markerKey | def priority13(): # rat ortholog (symbol) print 'processing priority 13...%s' % mgi_utils.date() cmd = 'select o.*, label = m.symbol, labelTypeName = s.commonName + " ortholog symbol" ' + \ 'from #orthology2 o, MRK_Marker m, MGI_Organism s ' + \ 'where o.m2 = m._Marker_key ' + \ 'and o._OrthologOrganism_key = s._Organism_key ' # rat symbol writeRecord(db.sql(cmd, 'auto'), 1, 13, 'OS', None) cmd = 'select _Marker_key, _Organism_key, _OrthologOrganism_key = NULL, label = symbol ' + \ 'from MRK_Marker ' + \ 'where _Organism_key = 40 ' if markerKey is not None: cmd = cmd + 'and _Marker_key = %s\n' % markerKey # rat name writeRecord(db.sql(cmd, 'auto'), 1, 13, 'MS', 'current symbol') cmd = 'select _Marker_key, _Organism_key, _OrthologOrganism_key = NULL, label = name ' + \ 'from MRK_Marker ' + \ 'where _Organism_key = 40 ' if markerKey is not None: cmd = cmd + 'and _Marker_key = %s\n' % markerKey writeRecord(db.sql(cmd, 'auto'), 1, 13, 'MN', 'current name') | 5b92781424868aacee0b2bc18b7096aa7848ce8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/342/5b92781424868aacee0b2bc18b7096aa7848ce8e/mrklabel.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4394,
3437,
13332,
225,
468,
15183,
16208,
3966,
261,
7175,
13,
225,
1172,
296,
10632,
4394,
5958,
2777,
9,
87,
11,
738,
312,
10052,
67,
5471,
18,
712,
1435,
225,
1797,
273,
296,
4025,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4394,
3437,
13332,
225,
468,
15183,
16208,
3966,
261,
7175,
13,
225,
1172,
296,
10632,
4394,
5958,
2777,
9,
87,
11,
738,
312,
10052,
67,
5471,
18,
712,
1435,
225,
1797,
273,
296,
4025,
... | |
sage: html(html_rangeslider('slider-007', 'null', 'alert(position)', steps=5, default_l=2, default_r=3, margin=5)) | sage: html(html_rangeslider('slider-007', 'null', 'alert(pos[0]+", "+pos[1])', steps=5, default_l=2, default_r=3, margin=5)) | def html_rangeslider(id, values, callback, steps, default_l=0, default_r=1, margin=0): """ Return the HTML representation of a jQuery slider. INPUT: id -- string -- the DOM id of the slider (better be unique) values -- 'null' or javascript string containing array of values on slider callback-- javascript that is executed whenever the slider is done moving steps -- number of steps from minimum to maximum value. default_l -- (default: 0) the default position of the left edge of the slider default_r -- (default: 1) the default position of the right edge of the slider margin -- (default: 0) size of margin to insert around the slider EXAMPLES: We create a jQuery HTML slider. If you do the following in the notebook you should obtain a slider that when moved pops up a window showing its current position. sage: from sage.server.notebook.interact import html_rangeslider, html sage: html(html_rangeslider('slider-007', 'null', 'alert(position)', steps=5, default_l=2, default_r=3, margin=5)) <html>...</html> """ s = """<table> <tr><td><div id='%s' class='ui-slider-3' style='padding:0px;margin:%spx;'> <span class='ui-slider-handle'></span><span class='ui-slider-handle'></span> </div></td></tr>"""%(id, int(margin)) if values != "null": s += "<tr><td><font color='black' id='%s-lbl'></font></td></tr>"%id s += "</table>" # We now generate javascript that gets run after the above div # gets inserted. This happens because of the setTimeout function # below which gets passed an anonymous function. s += """<script>(function() { var values = %s; var pos = [%s, %s]; var sel = '#%s'; var updatePos = function() { pos[0]=Math.ceil($(sel).slider('value', 0)); pos[1]=Math.ceil($(sel).slider('value', 1)); if(values!=null) $(sel+'-lbl').text("("+values[pos[0]]+", "+values[pos[1]]+")"); }; setTimeout(function() { $(sel).slider( { range: true, stepping: 1, minValue: 0, maxValue: %s, startValue: [%s, %s], change: function(){ updatePos(); %s; }, slide: updatePos }); updatePos(); }, 1); })();</script>"""%(values, default_l, default_r, id, steps-1, default_l, default_r, callback) # change 'change' to 'slide' and it changes the slider every time it moves; # needs much more work to actually work, since server gets fludded by # requests. return s | 1d3f50ebffa376e7bd2e2d89dc307d13a57d23f6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/1d3f50ebffa376e7bd2e2d89dc307d13a57d23f6/interact.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
14530,
80,
3585,
12,
350,
16,
924,
16,
1348,
16,
6075,
16,
805,
67,
80,
33,
20,
16,
805,
67,
86,
33,
21,
16,
7333,
33,
20,
4672,
3536,
2000,
326,
3982,
4335,
434,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
14530,
80,
3585,
12,
350,
16,
924,
16,
1348,
16,
6075,
16,
805,
67,
80,
33,
20,
16,
805,
67,
86,
33,
21,
16,
7333,
33,
20,
4672,
3536,
2000,
326,
3982,
4335,
434,
279,
... |
return tcp_map.map[self.sport](bytes) | return tcp_map.map[self.sport](bytes, timestamp = timestamp) | def next(self, bytes): """Decode higher layer packets contained in TCP.""" if (self.dport in tcp_map.map): return tcp_map.map[self.dport](bytes) if (self.sport in tcp_map.map): return tcp_map.map[self.sport](bytes) return None | 90eca6707436c8c94eb6d30d2166f02e1b21f5e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5910/90eca6707436c8c94eb6d30d2166f02e1b21f5e8/tcp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
16,
1731,
4672,
3536,
6615,
10478,
3018,
12640,
7542,
316,
9911,
12123,
309,
261,
2890,
18,
72,
655,
316,
9658,
67,
1458,
18,
1458,
4672,
327,
9658,
67,
1458,
18,
1458,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
16,
1731,
4672,
3536,
6615,
10478,
3018,
12640,
7542,
316,
9911,
12123,
309,
261,
2890,
18,
72,
655,
316,
9658,
67,
1458,
18,
1458,
4672,
327,
9658,
67,
1458,
18,
1458,
... |
elif id != -1: | elif id: | def save_milestone(self, id): self.perm.assert_permission(perm.MILESTONE_MODIFY) if self.args.has_key('save'): name = self.args.get('name', '') if not name: raise TracError('You must provide a name for the milestone.', 'Required Field Missing') datemode = self.args.get('datemode', 'manual') if datemode == 'now': date = int(time.time()) else: datestr = self.args.get('date', '') date = 0 if datestr: date = self.parse_date(datestr) descr = self.args.get('descr', '') if id == -1: self.create_milestone(name, date, descr) else: self.update_milestone(id, name, date, descr) elif id != -1: self.req.redirect(self.env.href.milestone(id)) else: self.req.redirect(self.env.href.roadmap()) | f3a151aafecef938ddc857db0d77fdbc95978a0b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f3a151aafecef938ddc857db0d77fdbc95978a0b/Milestone.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
81,
18270,
12,
2890,
16,
612,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
7492,
900,
882,
5998,
67,
6720,
12096,
13,
309,
365,
18,
1968,
18,
5332,
67,
856,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1923,
67,
81,
18270,
12,
2890,
16,
612,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
7492,
900,
882,
5998,
67,
6720,
12096,
13,
309,
365,
18,
1968,
18,
5332,
67,
856,
26... |
self.omplSetup.setup() self.mainWidget.plannerWidget.resolution.setValue( self.omplSetup.getSpaceInformation().getStateValidityCheckingResolution()) | def openEnvironment(self): fname = str(QtGui.QFileDialog.getOpenFileName(self)) if len(fname)>0 and fname!=self.environmentFile: self.environmentFile = fname self.mainWidget.glViewer.deleteGLlists() if self.robotFile: glid = self.omplSetup.setMeshes(self.robotFile, self.environmentFile, True) self.omplSetup.setup() self.mainWidget.plannerWidget.resolution.setValue( self.omplSetup.getSpaceInformation().getStateValidityCheckingResolution()) else: glid = self.omplSetup.setMeshes(self.environmentFile, self.environmentFile, True) self.mainWidget.glViewer.GLlistid = glid self.mainWidget.glViewer.setBounds(self.omplSetup.getStateManifold().getBounds()) | 0272c869f794b5dbbfdb718d5147f9bd8a37c55a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7331/0272c869f794b5dbbfdb718d5147f9bd8a37c55a/ompl_app.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
5494,
12,
2890,
4672,
5299,
273,
609,
12,
23310,
18070,
18,
53,
812,
6353,
18,
588,
3678,
4771,
12,
2890,
3719,
309,
562,
12,
12749,
13,
34,
20,
471,
5299,
5,
33,
2890,
18,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
5494,
12,
2890,
4672,
5299,
273,
609,
12,
23310,
18070,
18,
53,
812,
6353,
18,
588,
3678,
4771,
12,
2890,
3719,
309,
562,
12,
12749,
13,
34,
20,
471,
5299,
5,
33,
2890,
18,
102... | |
class CallFront_radioButtons(ControlledCallFront): | class CallFrontRadioButtons(ControlledCallFront): | def action(self, value): self.control.setText(unicode(value)) | d26de079e17bbf73783829e143857af9e4646987 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/d26de079e17bbf73783829e143857af9e4646987/OWGUI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
12,
2890,
16,
460,
4672,
365,
18,
7098,
18,
542,
1528,
12,
9124,
12,
1132,
3719,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
12,
2890,
16,
460,
4672,
365,
18,
7098,
18,
542,
1528,
12,
9124,
12,
1132,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
and (c not in REAL_HOMES or REAL_HOMES.get(c) is obj) ] | and (c not in REAL_HOMES or REAL_HOMES[c] is obj) ] | def get_callables(obj, if_of = None, check_where_defined=False): publics = (getattr(obj, x) for x in dir(obj) if is_public(x)) callables = [x for x in publics if callable(x)] if check_where_defined: callables = [ c for c in callables if ROOT_PACKAGE in c.__module__ and (c not in REAL_HOMES or REAL_HOMES.get(c) is obj) ] if if_of: callables = [x for x in callables if if_of(x)] # isclass, ismethod etc return set(callables) | 2b6b7ca41174137cbb11abbffdb525dfaa8cc717 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1298/2b6b7ca41174137cbb11abbffdb525dfaa8cc717/gen_stubs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1991,
1538,
12,
2603,
16,
309,
67,
792,
273,
599,
16,
866,
67,
6051,
67,
2178,
33,
8381,
4672,
1071,
87,
273,
261,
588,
1747,
12,
2603,
16,
619,
13,
364,
619,
316,
1577,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1991,
1538,
12,
2603,
16,
309,
67,
792,
273,
599,
16,
866,
67,
6051,
67,
2178,
33,
8381,
4672,
1071,
87,
273,
261,
588,
1747,
12,
2603,
16,
619,
13,
364,
619,
316,
1577,
1... |
def _a(self, activity, pspec): print self.props.active | def __init__(self, handle): Activity.__init__(self, handle) | 4962315d6442759076f231f5982f7663bafc5d9c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7190/4962315d6442759076f231f5982f7663bafc5d9c/chat.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1640,
4672,
9621,
16186,
2738,
972,
12,
2890,
16,
1640,
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,
2738,
972,
12,
2890,
16,
1640,
4672,
9621,
16186,
2738,
972,
12,
2890,
16,
1640,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
if lfnReplicas.has_key(destSE): gLogger.info("ReplicaManager.__replicate: LFN is already registered at %s." % destSE) | if lfnReplicas.has_key( destSE ): gLogger.info( "ReplicaManager.__replicate: LFN is already registered at %s." % destSE ) | def __replicate(self,lfn,destSE,sourceSE='',destPath=''): """ Replicate a LFN to a destination SE. | 9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
266,
1780,
340,
12,
2890,
16,
80,
4293,
16,
10488,
1090,
16,
3168,
1090,
2218,
2187,
10488,
743,
2218,
11,
4672,
3536,
868,
1780,
340,
279,
18803,
50,
358,
279,
2929,
3174,
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,
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,
266,
1780,
340,
12,
2890,
16,
80,
4293,
16,
10488,
1090,
16,
3168,
1090,
2218,
2187,
10488,
743,
2218,
11,
4672,
3536,
868,
1780,
340,
279,
18803,
50,
358,
279,
2929,
3174,
18,
2... |
self.usersiters[user] = self.resultsmodel.append(None, [0, user, "", "", h_speed, h_queue, immediatedl, "", "", self.get_flag(user, country), "", 0, "", "", 0, speed, queue, status]) | self.usersiters[user] = self.resultsmodel.append(None, [0, user, "", "", h_speed, h_queue, immediatedl, "", "", self.get_flag(user, country), "", 0, "", country, 0, speed, queue, status]) | def append(self, results): ix = len(self.all_data) + 1 #l = len(self.data) | 8476b1fb75d49385060d75505a7dc7817cb53859 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8738/8476b1fb75d49385060d75505a7dc7817cb53859/search.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
12,
2890,
16,
1686,
4672,
8288,
273,
562,
12,
2890,
18,
454,
67,
892,
13,
397,
404,
468,
80,
273,
562,
12,
2890,
18,
892,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
714,
12,
2890,
16,
1686,
4672,
8288,
273,
562,
12,
2890,
18,
454,
67,
892,
13,
397,
404,
468,
80,
273,
562,
12,
2890,
18,
892,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return self[name] | try: return self[name] except KeyError, e: raise AttributeError(e) | def __getattr__(self, name): | 36aaeaeb46a2ba6aa24d8919592fa7983d89081e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/36aaeaeb46a2ba6aa24d8919592fa7983d89081e/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
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,
1001,
588,
1747,
972,
12,
2890,
16,
508,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
pofile = open(filepath, 'r') | encoding = self._charset.lower() pofile = codecs.open(filepath, 'r', encoding) | def __init__(self, filepath, template): self._filepath = filepath self._template = template self._count = 0 self._translated = 0 self._untranslated = 0 self._fuzzy = 0 self._porevisiondate = '' self._potcreationdate = '' self._poeditlanguage = '' self._translators = [] if os.access(filepath, os.R_OK): #If PO(T) file can read... reMsgId = re.compile('^msgid "(.*)"$', re.IGNORECASE) reMsgStr = re.compile('^msgstr "(.*)"$', re.IGNORECASE) reMsgContinued = re.compile('^"(.*)"$', re.IGNORECASE) reTranslator = re.compile('^# \* (.*)$', re.IGNORECASE) rePoRevisionDate = re.compile('PO-Revision-Date: ([0-9 :\+\-]+)', re.IGNORECASE) rePotCreationDate = re.compile('POT-Creation-Date: ([0-9 :\+\-]+)', re.IGNORECASE) rePoeditLanguage = re.compile('X-Poedit-Language: ([A-Z]+)', re.IGNORECASE) iMsgStarted = 0 sMsgId = '' sMsgStr = '' bIsFuzzy = False bIsMaintainer = False pofile = open(filepath, 'r') for line in pofile: #For all lines... line = line.strip() if line: #If NOT empty line... if line[0] != '#': #If NOT comment line... if reMsgId.findall(line): #If "msgid"... iMsgStarted = 1 tmp = reMsgId.findall(line) sMsgId = tmp[0] elif reMsgStr.findall(line): #If "msgstr"... iMsgStarted = 2 tmp = reMsgStr.findall(line) sMsgStr = tmp[0] elif reMsgContinued.findall(line): #If "msgid" or "msgstr" continued... tmp = reMsgContinued.findall(line) if iMsgStarted == 1: sMsgId = sMsgId + tmp[0] elif iMsgStarted == 2: sMsgStr = sMsgStr + tmp[0] else: #If comment line... iMsgStarted = -1 if line.startswith('#,'): #If "Reference" line... if line.find('fuzzy') > -1: #If "fuzzy"... bIsFuzzy = True elif line.startswith('# Maintainer:'): #If maintainer list starts... bIsMaintainer = True elif line.startswith('# Translators:'): #If translators list starts... bIsMaintainer = False elif reTranslator.findall(line): #If translator/maintainer... translator = reTranslator.findall(line) if re.findall('\<(.*)\>', translator[0]): #If mail address exists... tmp = re.findall('(.*) \<(.*)\>', translator[0]) sName = tmp[0][0] sMail = tmp[0][1] else: #If mail address NOT exists... sName = translator[0] sMail = '' self._translators.append(Translator(sName, sMail, bIsMaintainer)) else: #If empty line... iMsgStarted = 0 if iMsgStarted == 0: #If NOT inside a translation... if sMsgId != '': self._count += 1 if bIsFuzzy == False: #If NOT a fuzzy translation... if sMsgStr != '': self._translated += 1 else: self._untranslated += 1 else: #If a fuzzy translation... self._fuzzy += 1 elif sMsgStr != '': tmp = rePoRevisionDate.findall(sMsgStr) if tmp: #If "PO-Revision-Date"... #TODO: Convert to date! self._porevisiondate = tmp[0] tmp = rePotCreationDate.findall(sMsgStr) if tmp: #If "POT-Creation-Date"... #TODO: Convert to date! self._potcreationdate = tmp[0] tmp = rePoeditLanguage.findall(sMsgStr) if tmp: #If "X-Poedit-Language"... self._poeditlanguage = tmp[0] sMsgId = '' sMsgStr = '' bIsFuzzy = False pofile.close() | 4c01c06d4967722f0d956a509e29c8d2fb3a0e0a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5344/4c01c06d4967722f0d956a509e29c8d2fb3a0e0a/GetTranslationsStatus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3608,
16,
1542,
4672,
365,
6315,
10561,
273,
3608,
365,
6315,
3202,
273,
1542,
365,
6315,
1883,
273,
374,
365,
6315,
22899,
273,
374,
365,
6315,
318,
22899... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3608,
16,
1542,
4672,
365,
6315,
10561,
273,
3608,
365,
6315,
3202,
273,
1542,
365,
6315,
1883,
273,
374,
365,
6315,
22899,
273,
374,
365,
6315,
318,
22899... |
key = user, passwd, host, port | key = user, host, port, '/'.join(dirs) | def connect_ftp(self, user, passwd, host, port, dirs): key = user, passwd, host, port if key in self.cache: self.timeout[key] = time.time() + self.delay else: self.cache[key] = ftpwrapper(user, passwd, host, port, dirs) self.timeout[key] = time.time() + self.delay self.check_cache() return self.cache[key] | ed1c3622a0ebe4ec7ee6ada840f2ae088e8cc64b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/ed1c3622a0ebe4ec7ee6ada840f2ae088e8cc64b/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
67,
11727,
12,
2890,
16,
729,
16,
19093,
16,
1479,
16,
1756,
16,
7717,
4672,
498,
273,
729,
16,
1479,
16,
1756,
16,
2023,
18,
5701,
12,
8291,
13,
309,
498,
316,
365,
18,
2493,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3077,
67,
11727,
12,
2890,
16,
729,
16,
19093,
16,
1479,
16,
1756,
16,
7717,
4672,
498,
273,
729,
16,
1479,
16,
1756,
16,
2023,
18,
5701,
12,
8291,
13,
309,
498,
316,
365,
18,
2493,
... |
utils.logger.info( 'query has not been optimized ( hint: query does not contain type and/or name )' ) | utils.logger.debug( 'query has not been optimized ( hint: query does not contain type and/or name )' ) | def __findout_range( self, name, decl_type, recursive ): if not self._optimized: utils.logger.info( 'running non optimized query - optimization has not been done' ) decls = self.declarations if recursive: decls = algorithm.make_flatten( self.declarations ) return decls | 420149f2642ab48ea7ca588594f35e1e04160a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7398/420149f2642ab48ea7ca588594f35e1e04160a38/scopedef.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
4720,
659,
67,
3676,
12,
365,
16,
508,
16,
3496,
67,
723,
16,
5904,
262,
30,
309,
486,
365,
6315,
16689,
1235,
30,
2990,
18,
4901,
18,
1376,
12,
296,
8704,
1661,
15411,
843,
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,
1001,
4720,
659,
67,
3676,
12,
365,
16,
508,
16,
3496,
67,
723,
16,
5904,
262,
30,
309,
486,
365,
6315,
16689,
1235,
30,
2990,
18,
4901,
18,
1376,
12,
296,
8704,
1661,
15411,
843,
30... |
Bootstrap('automake-1.8', '1.8.1', 'http://ftp.gnu.org/gnu/automake/automake-1.8.1.tar.bz2', 638621, | Bootstrap('automake-1.8', '1.8.2', 'http://ftp.gnu.org/gnu/automake/automake-1.8.2.tar.bz2', 638894, | def build(self, config): if not self.wants_package(): return | 68e8ee7b783c3b57fc63359ff95d3f9073686445 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/68e8ee7b783c3b57fc63359ff95d3f9073686445/bootstrap.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
12,
2890,
16,
642,
4672,
309,
486,
365,
18,
91,
4388,
67,
5610,
13332,
327,
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,
1361,
12,
2890,
16,
642,
4672,
309,
486,
365,
18,
91,
4388,
67,
5610,
13332,
327,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return [os.path.expanduser(f) for f in config_files.split(os.pathsep) if f.strip()] | return [os.path.expanduser(f) for f in config_files if f.strip()] | def get_standard_config_files(self): """Return list of config files, from environment or standard.""" try: config_files = os.environ['DOCUTILSCONFIG'] except KeyError: config_files = self.standard_config_files return [os.path.expanduser(f) for f in config_files.split(os.pathsep) if f.strip()] | 0a982505402f728ee8293ed7ed9f3a69a2b18de5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/0a982505402f728ee8293ed7ed9f3a69a2b18de5/frontend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
10005,
67,
1425,
67,
2354,
12,
2890,
4672,
3536,
990,
666,
434,
642,
1390,
16,
628,
3330,
578,
4529,
12123,
775,
30,
642,
67,
2354,
273,
1140,
18,
28684,
3292,
19693,
1693,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
10005,
67,
1425,
67,
2354,
12,
2890,
4672,
3536,
990,
666,
434,
642,
1390,
16,
628,
3330,
578,
4529,
12123,
775,
30,
642,
67,
2354,
273,
1140,
18,
28684,
3292,
19693,
1693,
26... |
while l < s: oid, ldata = unpack(">8sI", read(12)) | while l < fsize: sdata = read(oidlen+intlen) oid, ldata = unpack(">%ssi" % oidlen, sdata) | def _finish(self, tid, u, d, e): txn = self._env.txn_begin() try: zeros={} referenceCount=self._referenceCount referenceCount_get=referenceCount.get referenceCount_put=referenceCount.put oreferences=self._oreferences oreferences_put=oreferences.put serial_put=self._index.put opickle_put=self._opickle.put serial=self._serial tmp=self._tmp s=tmp.tell() tmp.seek(0) read=tmp.read l=0 while l < s: oid, ldata = unpack(">8sI", read(12)) data=read(ldata) | 51cd99ef594284af5edf7a6bb4659ccea3fbd891 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/51cd99ef594284af5edf7a6bb4659ccea3fbd891/Packless.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
13749,
12,
2890,
16,
11594,
16,
582,
16,
302,
16,
425,
4672,
7827,
273,
365,
6315,
3074,
18,
24790,
67,
10086,
1435,
775,
30,
4922,
12938,
2114,
1380,
33,
2890,
6315,
6180,
1380,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13749,
12,
2890,
16,
11594,
16,
582,
16,
302,
16,
425,
4672,
7827,
273,
365,
6315,
3074,
18,
24790,
67,
10086,
1435,
775,
30,
4922,
12938,
2114,
1380,
33,
2890,
6315,
6180,
1380,
... |
outPolicy = policy.get("BackgroundEstimationStage.outputKeys") assert(outClipboard.contains(outPolicy.get("exposure%d" % i))) outPolicy = policy.get("CrRejectStage.outputKeys") | def testPipeline(self): policyFile = pexPolicy.DefaultPolicyFile("datarel", "crSplitStages_policy.paf", "tests") policy = pexPolicy.Policy.createPolicy(policyFile) | f871ff3ae309c7593f06e0c971403657b3e6cac7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6538/f871ff3ae309c7593f06e0c971403657b3e6cac7/crSplitStagesTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
8798,
12,
2890,
4672,
3329,
812,
273,
293,
338,
2582,
18,
1868,
2582,
812,
2932,
892,
2878,
3113,
315,
3353,
5521,
31359,
67,
5086,
18,
84,
1727,
3113,
315,
16341,
7923,
3329,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
8798,
12,
2890,
4672,
3329,
812,
273,
293,
338,
2582,
18,
1868,
2582,
812,
2932,
892,
2878,
3113,
315,
3353,
5521,
31359,
67,
5086,
18,
84,
1727,
3113,
315,
16341,
7923,
3329,
273,... | |
else: overview += "<td> </td>\n"; | else: overview += "<td> </td>\n"; | def namesort(a, b): return cmp(a['name'], b['name']) | 05a16b4c4adfb718aebc1075fb6c54dab4041fdb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/05a16b4c4adfb718aebc1075fb6c54dab4041fdb/generate_html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1257,
499,
12,
69,
16,
324,
4672,
327,
9411,
12,
69,
3292,
529,
17337,
324,
3292,
529,
19486,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1257,
499,
12,
69,
16,
324,
4672,
327,
9411,
12,
69,
3292,
529,
17337,
324,
3292,
529,
19486,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if so.journal_id: | if so.journal_id and so.journal_id.default_credit_account_id and so.journal_id.default_credit_account_id.reconcile: | def _sale_order_process(self, cr, uid, sale_order_id): so = self.pool.get('sale.order').browse(cr, uid, sale_order_id) wf_service = netsvc.LocalService('workflow') | 583eb99db1257cea02c2605331231a1e13cb643b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/583eb99db1257cea02c2605331231a1e13cb643b/dm_sale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
87,
5349,
67,
1019,
67,
2567,
12,
2890,
16,
4422,
16,
4555,
16,
272,
5349,
67,
1019,
67,
350,
4672,
1427,
273,
365,
18,
6011,
18,
588,
2668,
87,
5349,
18,
1019,
16063,
25731,
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,
5349,
67,
1019,
67,
2567,
12,
2890,
16,
4422,
16,
4555,
16,
272,
5349,
67,
1019,
67,
350,
4672,
1427,
273,
365,
18,
6011,
18,
588,
2668,
87,
5349,
18,
1019,
16063,
25731,
12... |
return laurent_series_ring_element.LaurentSeries(self, x, n) | elif is_FractionFieldElement(x) and \ (x.base_ring() is self.base_ring() or x.base_ring() == self.base_ring()) and \ (is_Polynomial(x.numerator()) or is_MPolynomial(x.numerator())): x = self(x.numerator())/self(x.denominator()) return self.gen()**n * x else: return laurent_series_ring_element.LaurentSeries(self, x, n) | def __call__(self, x, n=0): """ EXAMPLES: sage: R.<u> = LaurentSeriesRing(Qp(5, 10)) sage: S.<t> = LaurentSeriesRing(RationalField()) sage: print R(t + t^2 + O(t^3)) (1 + O(5^10))*u + (1 + O(5^10))*u^2 + O(u^3) | 37b7cd1f7116bcccf35cb1905789b2cbe70d1503 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/37b7cd1f7116bcccf35cb1905789b2cbe70d1503/laurent_series_ring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
290,
33,
20,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
534,
22782,
89,
34,
273,
511,
8377,
547,
6485,
10369,
12,
53,
84,
12,
25,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1991,
972,
12,
2890,
16,
619,
16,
290,
33,
20,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
534,
22782,
89,
34,
273,
511,
8377,
547,
6485,
10369,
12,
53,
84,
12,
25,
16,
... |
fp.write("%s = %s\n" % (key, value)) | fp.write("%s = %s\n" % (key, str(value).replace('\n', '\n\t'))) | def write(self, fp): """Write an .ini-format representation of the configuration state.""" if self.__defaults: fp.write("[DEFAULT]\n") for (key, value) in self.__defaults.items(): fp.write("%s = %s\n" % (key, value)) fp.write("\n") for section in self.sections(): fp.write("[" + section + "]\n") sectdict = self.__sections[section] for (key, value) in sectdict.items(): if key == "__name__": continue fp.write("%s = %s\n" % (key, value)) fp.write("\n") | 63a6f820451f75d73870412cafb71a9d4ad3f8b2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/63a6f820451f75d73870412cafb71a9d4ad3f8b2/ConfigParser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4253,
4672,
3536,
3067,
392,
263,
8767,
17,
2139,
4335,
434,
326,
1664,
919,
12123,
309,
365,
16186,
7606,
30,
4253,
18,
2626,
2932,
63,
5280,
13944,
82,
7923,
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,
1045,
12,
2890,
16,
4253,
4672,
3536,
3067,
392,
263,
8767,
17,
2139,
4335,
434,
326,
1664,
919,
12123,
309,
365,
16186,
7606,
30,
4253,
18,
2626,
2932,
63,
5280,
13944,
82,
7923,
364,
... |
self.rfile = sock.makefile("r", self.rbufsize) | self.rfile = sock.makefile("rb", self.rbufsize) | def __init__(self, sock, addr, server): self.socket = sock self.addr = addr self.server = server # Copy the class environ into self. self.environ = self.environ.copy() if SSL and isinstance(sock, SSL.ConnectionType): timeout = sock.gettimeout() self.rfile = SSL_fileobject(sock, "r", self.rbufsize) self.rfile.ssl_timeout = timeout self.sendall = _ssl_wrap_method(sock.sendall) self.environ["wsgi.url_scheme"] = "https" self.environ["HTTPS"] = "on" sslenv = getattr(server, "ssl_environ", None) if sslenv: self.environ.update(sslenv) else: self.rfile = sock.makefile("r", self.rbufsize) self.sendall = sock.sendall self.environ.update({"wsgi.input": self.rfile, "SERVER_NAME": self.server.server_name, }) if isinstance(self.server.bind_addr, basestring): # AF_UNIX. This isn't really allowed by WSGI, which doesn't # address unix domain sockets. But it's better than nothing. self.environ["SERVER_PORT"] = "" else: self.environ["SERVER_PORT"] = str(self.server.bind_addr[1]) # optional values # Until we do DNS lookups, omit REMOTE_HOST self.environ["REMOTE_ADDR"] = self.addr[0] self.environ["REMOTE_PORT"] = str(self.addr[1]) | 1bb10a8cb3aedfbf670a9fac3813183f5ea5b234 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/82/1bb10a8cb3aedfbf670a9fac3813183f5ea5b234/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
7313,
16,
3091,
16,
1438,
4672,
365,
18,
7814,
273,
7313,
365,
18,
4793,
273,
3091,
365,
18,
3567,
273,
1438,
225,
468,
5631,
326,
667,
5473,
1368,
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,
7313,
16,
3091,
16,
1438,
4672,
365,
18,
7814,
273,
7313,
365,
18,
4793,
273,
3091,
365,
18,
3567,
273,
1438,
225,
468,
5631,
326,
667,
5473,
1368,
365,
... |
if self.ystart[2] == 0.0: | if N.all(self.ystart[2] == 0.0): | def __init__(self, *args, **kwargs): """Call superclass init method.""" super(MalikModels, self).__init__(*args, **kwargs) #Set initial H value if None if self.ystart[2] == 0.0: U = self.potentials(self.ystart)[0] self.ystart[2] = self.findH(U, self.ystart) #Titles self.plottitle = r"Malik Models in $n$" self.tname = r"E-folds $n$" self.ynames = [r"$\phi$", r"$\dot{\phi}_0$", r"$H$"] | ca17172d92c4324f9a926be66d6f3d796980810a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/ca17172d92c4324f9a926be66d6f3d796980810a/cosmomodels.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
1477,
12098,
1208,
707,
12123,
2240,
12,
49,
287,
1766,
8430,
16,
365,
2934,
972,
2738,
972,
30857,
1968,
16,
2826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
380,
1968,
16,
2826,
4333,
4672,
3536,
1477,
12098,
1208,
707,
12123,
2240,
12,
49,
287,
1766,
8430,
16,
365,
2934,
972,
2738,
972,
30857,
1968,
16,
2826,
... |
os.startfile(url) return True | try: os.startfile(url) except WindowsError: return False else: return True | def open(self, url, new=0, autoraise=1): os.startfile(url) return True # Oh, my... | 65651bea05f337dff247bbe21dd81e05627974a4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/65651bea05f337dff247bbe21dd81e05627974a4/webbrowser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
880,
16,
394,
33,
20,
16,
2059,
10610,
784,
33,
21,
4672,
775,
30,
1140,
18,
1937,
768,
12,
718,
13,
1335,
8202,
668,
30,
282,
327,
1083,
469,
30,
327,
1053,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
12,
2890,
16,
880,
16,
394,
33,
20,
16,
2059,
10610,
784,
33,
21,
4672,
775,
30,
1140,
18,
1937,
768,
12,
718,
13,
1335,
8202,
668,
30,
282,
327,
1083,
469,
30,
327,
1053,
46... |
kwargs["use_ice"] = account.ice.enabled | kwargs["use_ice"] = hasattr(account, "ice") and account.ice.enabled | def __init__(self, account, transport): settings = SIPSimpleSettings() kwargs = dict(local_rtp_address=settings.local_ip.value) kwargs["use_srtp"] = (transport == "tls" or not account.audio.use_srtp_without_tls) and account.audio.srtp_encryption != "disabled" kwargs["srtp_forced"] = kwargs["use_srtp"] and account.audio.srtp_encryption == "mandatory" kwargs["use_ice"] = account.ice.enabled # TODO: look this up, also if not specified if account.ice.use_stun and len(account.stun_servers) > 0: kwargs["ice_stun_address"], kwargs["ice_stun_port"] = account.stun_servers[0] RTPTransport.__init__(self, **kwargs) | 8e2e012e679833655fb3426c4d3972f4b5218930 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/8e2e012e679833655fb3426c4d3972f4b5218930/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2236,
16,
4736,
4672,
1947,
273,
348,
2579,
5784,
2628,
1435,
1205,
273,
2065,
12,
3729,
67,
3797,
84,
67,
2867,
33,
4272,
18,
3729,
67,
625,
18,
1132,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2236,
16,
4736,
4672,
1947,
273,
348,
2579,
5784,
2628,
1435,
1205,
273,
2065,
12,
3729,
67,
3797,
84,
67,
2867,
33,
4272,
18,
3729,
67,
625,
18,
1132,
... |
R1 = C[:i-1]+T | R1 = C[:i]+T+F | def split(self, availWidth, availHeight): canv = self.canv C = self._content x = i = H = pS = 0 n = len(C) I2W = {} for x in xrange(n): c = C[x] I = c._ptoinfo if I not in I2W.keys(): T = I.trailer Hdr = I.header tW, tH = _listWrapOn(T, availWidth, self.canv) tSB = T[0].getSpaceBefore() I2W[I] = T,tW,tH,tSB else: T,tW,tH,tSB = I2W[I] _, h = c.wrapOn(canv,availWidth,0xfffffff) if x: h += max(c.getSpaceBefore()-pS,0) pS = c.getSpaceAfter() H += h+pS if H+tH+max(tSB,pS)>=availHeight-_FUZZ: break i += 1 | 8d8c0ec1fd140512007c83c05dcbc570c6560932 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/8d8c0ec1fd140512007c83c05dcbc570c6560932/flowables.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1416,
12,
2890,
16,
15783,
2384,
16,
15783,
2686,
4672,
848,
90,
273,
365,
18,
4169,
90,
385,
273,
365,
6315,
1745,
619,
273,
277,
273,
670,
273,
293,
55,
273,
374,
290,
273,
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,
1416,
12,
2890,
16,
15783,
2384,
16,
15783,
2686,
4672,
848,
90,
273,
365,
18,
4169,
90,
385,
273,
365,
6315,
1745,
619,
273,
277,
273,
670,
273,
293,
55,
273,
374,
290,
273,
562,
12... |
_scriptName = 'preUpdateScripts' | def __init__(self, *args, **kwargs): TroveScript.__init__(self, *args, **kwargs) if self.toClass: self._compatibilityMap = self.toClass | c62fd47117ecbd2ce3dea6fe66da06de094cebf6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/c62fd47117ecbd2ce3dea6fe66da06de094cebf6/source.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
399,
303,
537,
3651,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
309,
365,
18,
869,
797,
30,
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,
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,
16,
2826,
4333,
4672,
399,
303,
537,
3651,
16186,
2738,
972,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
13,
309,
365,
18,
869,
797,
30,
365,
6... | |
k, v = reverse[rkey] if reduce(operator.__add__, v.values()): print >> fp, ' v = v.keys() v.sort() if not options.writelocations: pass elif options.locationstyle == options.SOLARIS: for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} print >>fp, _(' elif options.locationstyle == options.GNU: locline = ' for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} s = _(' %(filename)s:%(lineno)d') % d if len(locline) + len(s) <= options.width: locline = locline + s else: | rentries = reverse[rkey] rentries.sort() for k, v in rentries: if reduce(operator.__add__, v.values()): print >> fp, ' v = v.keys() v.sort() if not options.writelocations: pass elif options.locationstyle == options.SOLARIS: for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} print >>fp, _( ' elif options.locationstyle == options.GNU: locline = ' for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} s = _(' %(filename)s:%(lineno)d') % d if len(locline) + len(s) <= options.width: locline = locline + s else: print >> fp, locline locline = " if len(locline) > 2: | def write(self, fp): options = self.__options timestamp = time.ctime(time.time()) # The time stamp in the header doesn't have the same format as that # generated by xgettext... print >> fp, pot_header % {'time': timestamp, 'version': __version__} # Sort the entries. First sort each particular entry's keys, then # sort all the entries by their first item. reverse = {} for k, v in self.__messages.items(): keys = v.keys() keys.sort() reverse[tuple(keys)] = (k, v) rkeys = reverse.keys() rkeys.sort() for rkey in rkeys: k, v = reverse[rkey] # If the entry was gleaned out of a docstring, then add a comment # stating so. This is to aid translators who may wish to skip # translating some unimportant docstrings. if reduce(operator.__add__, v.values()): print >> fp, '#. docstring' # k is the message string, v is a dictionary-set of (filename, # lineno) tuples. We want to sort the entries in v first by file # name and then by line number. v = v.keys() v.sort() if not options.writelocations: pass # location comments are different b/w Solaris and GNU: elif options.locationstyle == options.SOLARIS: for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} print >>fp, _('# File: %(filename)s, line: %(lineno)d') % d elif options.locationstyle == options.GNU: # fit as many locations on one line, as long as the # resulting line length doesn't exceeds 'options.width' locline = '#:' for filename, lineno in v: d = {'filename': filename, 'lineno': lineno} s = _(' %(filename)s:%(lineno)d') % d if len(locline) + len(s) <= options.width: locline = locline + s else: print >> fp, locline locline = "#:" + s if len(locline) > 2: print >> fp, locline # TBD: sorting, normalizing print >> fp, 'msgid', normalize(k) print >> fp, 'msgstr ""\n' | e60eb21dfaade124f2ecefdd548e542412b7325e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e60eb21dfaade124f2ecefdd548e542412b7325e/pygettext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4253,
4672,
702,
273,
365,
16186,
2116,
2858,
273,
813,
18,
21261,
12,
957,
18,
957,
10756,
468,
1021,
813,
14429,
316,
326,
1446,
3302,
1404,
1240,
326,
1967,
740,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
12,
2890,
16,
4253,
4672,
702,
273,
365,
16186,
2116,
2858,
273,
813,
18,
21261,
12,
957,
18,
957,
10756,
468,
1021,
813,
14429,
316,
326,
1446,
3302,
1404,
1240,
326,
1967,
740,
... |
op.dry_run = options.dry_run | if hasattr(options, "dry_run"): op.dry_run = options.dry_run | def SetGenericOpcodeOpts(opcode_list, options): """Processor for generic options. This function updates the given opcodes based on generic command line options (like debug, dry-run, etc.). @param opcode_list: list of opcodes @param options: command line options or None @return: None (in-place modification) """ if not options: return for op in opcode_list: op.dry_run = options.dry_run op.debug_level = options.debug | a0a6ff346e26ad072f0ec533dbeb0b38173b6bac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/a0a6ff346e26ad072f0ec533dbeb0b38173b6bac/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1000,
7014,
22808,
5476,
12,
556,
710,
67,
1098,
16,
702,
4672,
3536,
5164,
364,
5210,
702,
18,
225,
1220,
445,
4533,
326,
864,
1061,
7000,
2511,
603,
5210,
1296,
980,
702,
261,
5625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7014,
22808,
5476,
12,
556,
710,
67,
1098,
16,
702,
4672,
3536,
5164,
364,
5210,
702,
18,
225,
1220,
445,
4533,
326,
864,
1061,
7000,
2511,
603,
5210,
1296,
980,
702,
261,
5625,
... |
else | else: | def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 416) else quickfix.IntField.__init__(self, 416, data) | 484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
1059,
2313,
13,
469,
30,
9549,
904,
18,
1702,
974,
16186,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
892,
273,
599,
13,
309,
501,
422,
599,
30,
9549,
904,
18,
1702,
974,
16186,
2738,
972,
12,
2890,
16,
1059,
2313,
13,
469,
30,
9549,
904,
18,
1702,
974,
16186,
27... |
min = int(time()) + self.MaxWaitTime | min = int(time.time()) + self.MaxWaitTime | def calcNextActivation(self): self.processActivation() min = int(time()) + self.MaxWaitTime # calculate next activation point if len(self.timer_list): w = self.timer_list[0].getTime() if w < min: min = w self.setNextActivation(min) | 79cf98c3e95f22d6fc72a066cbf2c573401c6bd9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/79cf98c3e95f22d6fc72a066cbf2c573401c6bd9/timer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7029,
2134,
14857,
12,
2890,
4672,
365,
18,
2567,
14857,
1435,
225,
1131,
273,
509,
12,
957,
18,
957,
10756,
397,
365,
18,
2747,
23637,
225,
468,
4604,
1024,
10027,
1634,
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,
7029,
2134,
14857,
12,
2890,
4672,
365,
18,
2567,
14857,
1435,
225,
1131,
273,
509,
12,
957,
18,
957,
10756,
397,
365,
18,
2747,
23637,
225,
468,
4604,
1024,
10027,
1634,
309,
562,
12,
... |
print "source", nodelist[-1] | def factor(self, nodelist): elt = nodelist[0] t = elt[0] print "source", nodelist[-1] node = self.com_node(nodelist[-1]) # need to handle (unary op)constant here... if t == token.PLUS: node = UnaryAdd(node) node.lineno = elt[2] elif t == token.MINUS: print node node = UnarySub(node) node.lineno = elt[2] elif t == token.TILDE: node = Invert(node) node.lineno = elt[2] return node | c87e287a024657bea38a5e2ce0f91072757aa025 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c87e287a024657bea38a5e2ce0f91072757aa025/transformer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5578,
12,
2890,
16,
30068,
4672,
11572,
273,
30068,
63,
20,
65,
268,
273,
11572,
63,
20,
65,
756,
273,
365,
18,
832,
67,
2159,
12,
82,
24221,
18919,
21,
5717,
468,
1608,
358,
1640,
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,
5578,
12,
2890,
16,
30068,
4672,
11572,
273,
30068,
63,
20,
65,
268,
273,
11572,
63,
20,
65,
756,
273,
365,
18,
832,
67,
2159,
12,
82,
24221,
18919,
21,
5717,
468,
1608,
358,
1640,
2... | |
if dbmodule and dbmodule.__name__ == 'adodbapi': def convert_bind_param(self, value, dialect): return value def convert_result_value(self, value, dialect): return value | class AdoMSUnicode(MSUnicode): impl = AdoMSNVarchar def convert_bind_param(self, value, dialect): return value def convert_result_value(self, value, dialect): return value | def convert_result_value(self, value, dialect): return value | fc53d244b74c32d68c7144bd7a419f16ec528d52 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/fc53d244b74c32d68c7144bd7a419f16ec528d52/mssql.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
2088,
67,
1132,
12,
2890,
16,
460,
16,
10864,
4672,
327,
460,
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,
1765,
67,
2088,
67,
1132,
12,
2890,
16,
460,
16,
10864,
4672,
327,
460,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
elif value > 0 and len(self.update_interval_presets) < value: | elif value > 0 and len(self.update_interval_presets) > value: | def format_update_interval_value(self, scale, value): value = int(value) if value == 0: return _('manual only') elif value > 0 and len(self.update_interval_presets) < value: return util.format_seconds_to_hour_min_sec(self.update_interval_presets[value]*60) else: return str(value) | f2b40ef6bdb5a7ea4cdea87236fcd0a5e303f060 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12778/f2b40ef6bdb5a7ea4cdea87236fcd0a5e303f060/preferences.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
67,
2725,
67,
6624,
67,
1132,
12,
2890,
16,
3159,
16,
460,
4672,
460,
273,
509,
12,
1132,
13,
309,
460,
422,
374,
30,
327,
389,
2668,
19840,
1338,
6134,
1327,
460,
405,
374,
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,
740,
67,
2725,
67,
6624,
67,
1132,
12,
2890,
16,
3159,
16,
460,
4672,
460,
273,
509,
12,
1132,
13,
309,
460,
422,
374,
30,
327,
389,
2668,
19840,
1338,
6134,
1327,
460,
405,
374,
471... |
def close_read(self): self.resp.read() | def open_write(self, headers=None): raise BotoClientError('Not Implemented') def open(self, mode='r', headers=None): if mode == 'r': self.mode = 'r' self.open_read() elif mode == 'w': self.mode = 'w' self.open_write() else: raise BotoClientError('Invalid mode: %s' % mode) def close(self): if self.resp: self.resp.read() | def close_read(self): self.resp.read() self.resp = None self.mode = None | 15047e8eb513b07becf0469abce0fdc9a780b88e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/15047e8eb513b07becf0469abce0fdc9a780b88e/key.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
2626,
12,
2890,
16,
1607,
33,
7036,
4672,
1002,
605,
6302,
1227,
668,
2668,
1248,
18788,
6134,
225,
1652,
1696,
12,
2890,
16,
1965,
2218,
86,
2187,
1607,
33,
7036,
4672,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
2626,
12,
2890,
16,
1607,
33,
7036,
4672,
1002,
605,
6302,
1227,
668,
2668,
1248,
18788,
6134,
225,
1652,
1696,
12,
2890,
16,
1965,
2218,
86,
2187,
1607,
33,
7036,
4672,
309,
... |
self.__proxypeername = (socket.inet_ntoa(ipaddr),destport) else: self.__proxypeername = (destaddr,destport) | self.__proxypeername = (socket.inet_ntoa(ipaddr), destport) else: self.__proxypeername = (destaddr, destport) | def __negotiatesocks5(self,destaddr,destport): """__negotiatesocks5(self,destaddr,destport) Negotiates a connection through a SOCKS5 server. """ # First we'll send the authentication packages we support. if (self.__proxy[4]!=None) and (self.__proxy[5]!=None): # The username/password details were supplied to the # setproxy method so we support the USERNAME/PASSWORD # authentication (in addition to the standard none). self.sendall("\x05\x02\x00\x02") else: # No username/password were entered, therefore we # only support connections with no authentication. self.sendall("\x05\x01\x00") # We'll receive the server's response to determine which # method was selected chosenauth = self.__recvall(2) if chosenauth[0] != "\x05": self.close() raise GeneralProxyError((1,_generalerrors[1])) # Check the chosen authentication method if chosenauth[1] == "\x00": # No authentication is required pass elif chosenauth[1] == "\x02": # Okay, we need to perform a basic username/password # authentication. self.sendall("\x01" + chr(len(self.__proxy[4])) + self.__proxy[4] + chr(len(self.__proxy[5])) + self.__proxy[5]) authstat = self.__recvall(2) if authstat[0] != "\x01": # Bad response self.close() raise GeneralProxyError((1,_generalerrors[1])) if authstat[1] != "\x00": # Authentication failed self.close() raise Socks5AuthError((3,_socks5autherrors[3])) # Authentication succeeded else: # Reaching here is always bad self.close() if chosenauth[1] == "\xFF": raise Socks5AuthError((2,_socks5autherrors[2])) else: raise GeneralProxyError((1,_generalerrors[1])) # Now we can request the actual connection req = "\x05\x01\x00" # If the given destination address is an IP address, we'll # use the IPv4 address request even if remote resolving was specified. try: ipaddr = socket.inet_aton(destaddr) req = req + "\x01" + ipaddr except socket.error: # Well it's not an IP number, so it's probably a DNS name. if self.__proxy[3]==True: # Resolve remotely ipaddr = None req = req + "\x03" + chr(len(destaddr)) + destaddr else: # Resolve locally ipaddr = socket.inet_aton(socket.gethostbyname(destaddr)) req = req + "\x01" + ipaddr req = req + self.__decode(struct.pack(">H",destport)) self.sendall(req) # Get the response resp = self.__recvall(4) if resp[0] != "\x05": self.close() raise GeneralProxyError((1,_generalerrors[1])) elif resp[1] != "\x00": # Connection failed self.close() if ord(resp[1])<=8: raise Socks5Error((ord(resp[1]),_socks5errors[ord(resp[1])])) else: raise Socks5Error((9,_socks5errors[9])) # Get the bound address/port elif resp[3] == "\x01": boundaddr = self.__recvall(4) elif resp[3] == "\x03": resp = resp + self.recv(1) boundaddr = self.__recvall(ord(resp[4])) else: self.close() raise GeneralProxyError((1,_generalerrors[1])) boundport = struct.unpack(">H",bytes(self.__recvall(2), 'utf8'))[0] self.__proxysockname = (boundaddr,boundport) if ipaddr != None: self.__proxypeername = (socket.inet_ntoa(ipaddr),destport) else: self.__proxypeername = (destaddr,destport) | 9c2eaf1c9f74544afe20a86fa591d97eeaa8921c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13138/9c2eaf1c9f74544afe20a86fa591d97eeaa8921c/socks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
4672,
3536,
972,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
13,
423,
27445,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
4672,
3536,
972,
14518,
352,
16020,
20641,
25,
12,
2890,
16,
10488,
4793,
16,
10488,
655,
13,
423,
27445,
1... |
if not context: | if context is None: | def _name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100, name_get_uid=None): if not args: args = [] if not context: context = {} args = args[:] if name: args += [(self._rec_name, operator, name)] ids = self.search(cr, user, args, limit=limit, context=context) res = self.name_get(cr, name_get_uid or user, ids, context) return res | 691686ade80c889dba0db57f293780cf3c0a0596 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/691686ade80c889dba0db57f293780cf3c0a0596/orm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
529,
67,
3072,
12,
2890,
16,
4422,
16,
729,
16,
508,
2218,
2187,
833,
33,
7036,
16,
3726,
2218,
330,
2547,
2187,
819,
33,
7036,
16,
1800,
33,
6625,
16,
508,
67,
588,
67,
1911,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
529,
67,
3072,
12,
2890,
16,
4422,
16,
729,
16,
508,
2218,
2187,
833,
33,
7036,
16,
3726,
2218,
330,
2547,
2187,
819,
33,
7036,
16,
1800,
33,
6625,
16,
508,
67,
588,
67,
1911,
... |
def readable (self): | def readable(self): | def readable (self): return True | f7eb0d3f501f2e379b8719bda476d318d1e79160 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f7eb0d3f501f2e379b8719bda476d318d1e79160/asyncore.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7471,
12,
2890,
4672,
327,
1053,
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,
7471,
12,
2890,
4672,
327,
1053,
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,
-1... |
fname_basename = 'snp_%s_%s_id_%s_phenotype_%s_%s'%\ (this_snp.chromosome, this_snp.position, this_snp.snps_id, phenotype.id, phenotype.short_name) | if call_method_id is None: call_method_id = self.call_method_id fname_basename = 'snp_%s_%s_id_%s_call_method_%s_phenotype_%s_%s'%\ (this_snp.chromosome, this_snp.position, this_snp.snps_id, call_method_id, phenotype.id, phenotype.short_name) | def drawRegionAroundThisSNP(self, phenotype_method_id, this_snp, candidate_gene_set, gene_annotation, snp_info, analysis_method_id2gwr, \ LD_info, output_dir, which_LD_statistic, snp_region=None, min_distance=40000, list_type_id=None, label_gene=0, draw_LD_relative_to_center_SNP=0, commit=0, snpData=None, phenData=None, ecotype_info=None,\ snpData_before_impute=None, snp_matrix_data_type=1): """ 2009-4-30 deal with argument snp_matrix_data_type =4 (arbitrary non-diallelic SNP matrix) could handle both (chr,pos) and (chr,pos,offset) SNP representation skip drawing gene models if no SNPs in the region at all. return None if no SNPs are found in the region. 2009-3-23 add arguments snp_matrix_data_type to allow CNV or CNV amplitude to fill the SNP matrix 2008-12-01 add option snpData_before_impute 2008-11-30 add code to replace axe_LD with axe_strain_pca, axe_snp_matrix, axe_map to demonstrate the haplotype structure, phenotype and geographic source of strains. 2008-10-24 handle option commit to return png_data & svg_data 2008-10-01 remove the frame of ax1 and add a grid to ax1 leave axe_gene_model's xticks there as otherwise ax1's xticks will go with it as they share xticks. 2008-10-01 draw gene models on a separate axe, add a twinx axe to draw LD w.r.t the center SNP if output_dir is not a directory, it's treated as a filename. 2008-09-24 """ sys.stderr.write("Drawing region ... \n") phenotype = Stock_250kDB.PhenotypeMethod.get(phenotype_method_id) if not os.path.isdir(output_dir): output_fname_prefix = output_dir else: #list_type = Stock_250kDB.GeneListType.get(list_type_id) fname_basename = 'snp_%s_%s_id_%s_phenotype_%s_%s'%\ (this_snp.chromosome, this_snp.position, this_snp.snps_id, phenotype.id, phenotype.short_name) fname_basename = fname_basename.replace('/', '_') output_fname_prefix = os.path.join(output_dir, fname_basename) if snp_region: snps_within_this_region = snp_region elif getattr(this_snp, 'stop', None): snps_within_this_region = self.findSNPsInRegion(snp_info, this_snp.chromosome, this_snp.position, this_snp.stop) snps_within_this_region_snpData = self.findSNPsInRegion(snpData, this_snp.chromosome, this_snp.position, this_snp.stop) else: snps_within_this_region = self.getSNPsAroundThisSNP(this_snp, snp_info, min_distance) snps_within_this_region_snpData = snps_within_this_region if len(snps_within_this_region.chr_pos_ls)==0 and len(snps_within_this_region_snpData.chr_pos_ls)==0: return None pylab.clf() #fig = pylab.figure() axe_y_offset1 = 0.05 #y_offset for axe_LD, axe_strain_pca, axe_phenotype, axe_map axe_height1 = 0.55 #height of axe_LD or axe_snp_matrix axe_y_offset2 = axe_y_offset1+axe_height1 axe_height2 = 0.1 #height of axe_gene_model axe_y_offset3 = axe_y_offset2+axe_height2 axe_height3 = 0.25 #height of ax1 axe_y_offset4 = axe_y_offset3+axe_height3 axe_x_offset1 = 0.02 # axe_width1 = 0.2 #width of axe_strain_pca axe_x_offset2 = axe_x_offset1 + axe_width1 axe_width2 = 0.55 #width of ax1, axe_LD, or axe_snp_matrix axe_x_offset3 = axe_x_offset2 + axe_width2 axe_width3 = 0.02 #width of axe_phenotype axe_x_offset4 = axe_x_offset3 + axe_width3 axe_width4 = 0.2 #width of axe_map, axe_map_frame axe_x_offset5 = axe_x_offset4 + axe_width4 no_of_axes_drawn = 0 ax1 = pylab.axes([axe_x_offset2, axe_y_offset3, axe_width2, axe_height3], frameon=False) #left gap, bottom gap, width, height, axes for pvalue, gene models ax1.grid(True, alpha=0.3) ax1.set_xticklabels([]) #remove xtick labels on ax1 because axe_LD's xtick labels cover this. axe_LD_center_SNP = pylab.twinx() #axes for LD with center SNP, copy ax1's axe_LD_center_SNP.set_xticklabels([]) axe_gene_model = pylab.axes([axe_x_offset2, axe_y_offset2, axe_width2, axe_height2], frameon=False, sharex=ax1) #axe_gene_model.set_xticks([]) #this will set ax1's xticks off as well because the x-axis is shared. axe_gene_model.set_yticks([]) snp_region_tup = [snps_within_this_region_snpData.chr_pos_ls[0][0], snps_within_this_region_snpData.chr_pos_ls[0][1],\ snps_within_this_region_snpData.chr_pos_ls[-1][0], snps_within_this_region_snpData.chr_pos_ls[-1][1]] axe_snp_matrix_margin = abs(snp_region_tup[3]-snp_region_tup[1])/15. #offset to push strain labels on even rows further right if LD_info: axe_LD = pylab.axes([axe_x_offset2, axe_y_offset1, axe_width2, axe_height1], frameon=False) #axes for LD axe_LD_legend = pylab.axes([axe_x_offset3-0.1, axe_y_offset1+0.03, 0.1, 0.13], frameon=False) #axes for the legend of LD axe_LD_legend.set_xticks([]) axe_LD_legend.set_yticks([]) axe_to_put_pvalue_legend = axe_LD legend_loc = 'lower left' axe_pvalue_xlim = [snp_region_tup[1]-axe_snp_matrix_margin, snp_region_tup[3]+axe_snp_matrix_margin] elif snpData: phenotype_col_index = PlotGroupOfSNPs.findOutWhichPhenotypeColumn(phenData, Set([phenotype_method_id]))[0] genome_wide_result = analysis_method_id2gwr.get(1) if not genome_wide_result: sys.stderr.write("No genome association results for phenotype_method_id=%s, analysis_method_id=%s. Take a random one out of analysis_method_id2gwr.\n"%\ (phenotype_method_id, 1)) genome_wide_result = analysis_method_id2gwr.values()[0] #take random gwr if snp_matrix_data_type==1: chr_pos_ls = None else: chr_pos_ls = snpData.chr_pos2index.keys() #2008-12-08 for CNV probes. use snpData.chr_pos2index.keys() to locate top_snp_data because here snpData doesn't match genome_wide_result. top_snp_data = self.getTopSNPData(genome_wide_result, None, snp_region_tup, chr_pos_ls=chr_pos_ls) if snp_matrix_data_type==3: #2009-3-23 for CNV amplitude data, don't convert alleles into binary 0/1=major/minor form and use allele/amplitude to determine alpha need_convert_alleles2binary = False useAlleleToDetermineAlpha = True elif snp_matrix_data_type==4: #2009-3-27, for arbitrary non-diallelic SNP matrix need_convert_alleles2binary = False useAlleleToDetermineAlpha = False else: need_convert_alleles2binary = True useAlleleToDetermineAlpha = False subSNPData = self.getSubStrainSNPMatrix(snpData, phenData, phenotype_method_id, phenotype_col_index, top_snp_data.snp_id_ls, need_convert_alleles2binary=need_convert_alleles2binary) #2009-3-23 last argument is for CNV intensity matrix snp_value2color = None if snp_matrix_data_type==4: ##2009-3-27 it's for SNP matrix inferred from raw sequences, might have >2 alleles, heterozygous calls, deletions etc. from DrawSNPMatrix import DrawSNPMatrix subSNPData.data_matrix = DrawSNPMatrix.transformMatrixIntoTwoAllelesAndHetero(subSNPData.data_matrix) snp_value2color = self.snp_value2five_color #the two offsets below decides where the label of strains/snps should start in axe_snp_matrix last_chr_pos = snps_within_this_region_snpData.chr_pos_ls[-1] strain_id_label_x_offset=snps_within_this_region_snpData.chr_pos2adjacent_window[last_chr_pos][1] #right next to the rightmost SNP snp_id_label_y_offset=0.95 StrainID2PCAPosInfo = self.getStrainID2PCAPosInfo(subSNPData, pca_range=[0,1], snp_id_label_y_offset=snp_id_label_y_offset) #fake one SNPID2PCAPosInfo only for drawSNPMtrix() SNPID2PCAPosInfo = PassingData(step=None, snp_id2img_x_pos={}) for chr_pos, adjacent_window in snps_within_this_region_snpData.chr_pos2adjacent_window.iteritems(): chr_pos = map(str, chr_pos) snp_id = '_'.join(chr_pos) SNPID2PCAPosInfo.snp_id2img_x_pos[snp_id] = adjacent_window phenotype_cmap = mpl.cm.jet max_phenotype = numpy.nanmax(phenData.data_matrix[:,phenotype_col_index]) min_phenotype = numpy.nanmin(phenData.data_matrix[:,phenotype_col_index]) phenotype_gap = max_phenotype - min_phenotype phenotype_jitter = phenotype_gap/10. phenotype_norm = mpl.colors.Normalize(vmin=min_phenotype-phenotype_jitter, vmax=max_phenotype+phenotype_jitter) axe_map_phenotype_legend = pylab.axes([axe_x_offset4+0.02, axe_y_offset1, axe_width4-0.02, axe_height1/10.], frameon=False) cb = mpl.colorbar.ColorbarBase(axe_map_phenotype_legend, cmap=phenotype_cmap, norm=phenotype_norm, orientation='horizontal') cb.set_label('Phenotype Legend On the Map') axe_strain_map = None #no strain map axe_strain_pca = pylab.axes([axe_x_offset1, axe_y_offset1, axe_width1, axe_height1], frameon=False) axe_strain_map_pca_cover = None #not used. axe_strain_pca_xlim = [-0.05,1.05] axe_strain_pca_ylim = [0, 1] axe_strain_pca.set_xlim(axe_strain_pca_xlim) axe_strain_pca.set_ylim(axe_strain_pca_ylim) axe_strain_pca.grid(True, alpha=0.3) axe_strain_pca.set_xticks([]) axe_strain_pca.set_yticks([]) axe_strain_pca_legend =None self.drawStrainPCA(axe_strain_pca, axe_strain_map, axe_strain_map_pca_cover, axe_strain_pca_legend, StrainID2PCAPosInfo, \ ecotype_info, phenData, \ phenotype_col_index, phenotype_cmap, phenotype_norm, rightmost_x_value=axe_strain_pca_xlim[1],\ country_order_name='', strain_color_type=2, draw_axe_strain_map=False) axe_strain_pca.set_xlim(axe_strain_pca_xlim) axe_strain_pca.set_ylim(axe_strain_pca_ylim) no_of_axes_drawn += 1 if self.debug: pylab.savefig('%s_%s.png'%(output_fname_prefix, no_of_axes_drawn), dpi=400) #mark ecotypes on the map colored according to phenotype axe_map = pylab.axes([axe_x_offset4, axe_y_offset1, axe_width4, axe_height1], frameon=False) #axe_map_frame is used to connect strains from axe_phenotype to dot on the axe_map (another axe due to reasons stated in drawMap()) axe_map_frame = pylab.axes([axe_x_offset4, axe_y_offset1, axe_width4, axe_height1], frameon=False, sharey=axe_strain_pca) axe_map_frame.set_xticks([]) axe_map_frame.set_yticks([]) self.drawMap(axe_map_frame, axe_map, StrainID2PCAPosInfo, phenData, phenotype_col_index, phenotype_method_id, \ ecotype_info, phenotype_cmap, phenotype_norm) #axe_map.set_ylim([0,1]) no_of_axes_drawn += 1 if self.debug: pylab.savefig('%s_%s.png'%(output_fname_prefix, no_of_axes_drawn), dpi=400) axe_snp_matrix = pylab.axes([axe_x_offset2, axe_y_offset1, axe_width2, axe_height1], frameon=False, sharey=axe_strain_pca) #axe_snp_matrix.set_xticks([]) axe_snp_matrix.set_yticks([]) self.drawSNPMtrix(axe_snp_matrix, subSNPData, top_snp_data, StrainID2PCAPosInfo, SNPID2PCAPosInfo, \ ecotype_info, strain_id_label_x_offset, snp_id_label_y_offset, strain_id_label_x_offset_extra=axe_snp_matrix_margin,\ draw_snp_id_label=False, snpData_before_impute=snpData_before_impute, \ useAlleleToDetermineAlpha=useAlleleToDetermineAlpha,\ snp_value2color=snp_value2color) #2008-11-14 turn draw_snp_id_label off #axe_snp_matrix.set_xlim([0,1]) #axe_snp_matrix.set_ylim([0,1]) no_of_axes_drawn += 1 #pylab.savefig('%s_%s.png'%(self.output_fname_prefix, no_of_axes_drawn), dpi=400) axe_phenotype = pylab.axes([axe_x_offset3, axe_y_offset1, axe_width3, axe_height1], frameon=False, sharey=axe_snp_matrix) axe_phenotype.set_yticks([]) axe_phenotype.set_xticklabels([]) #no tick labels (axe_map_phenotype_legend has it already) self.drawPhenotype(axe_phenotype, StrainID2PCAPosInfo, phenData, phenotype_col_index, phenotype_method_id, ecotype_info) no_of_axes_drawn += 1 axe_phenotype.set_ylim([0,1]) axe_snp_matrix.set_ylim([0,1]) #without this, ylim of all 3 axes are set to [0,0.9] because axe_map automatically adjust to 0-0.9 #pylab.savefig('%s_%s.png'%(self.output_fname_prefix, no_of_axes_drawn), dpi=400) axe_to_put_pvalue_legend = ax1 #axe_LD is gone. put legend into ax1 itself. legend_loc = 'upper right' axe_LD = None axe_LD_legend = None axe_pvalue_xlim = [snp_region_tup[1]-axe_snp_matrix_margin, snp_region_tup[3]+axe_snp_matrix_margin*2] fig_title = 'SNP chr %s. pos %s.'%(this_snp.chromosome, this_snp.position) if getattr(this_snp, 'stop', None): fig_title += ' - %s. '%this_snp.stop fig_title += "Phenotype %s (id=%s)."%(phenotype.short_name, phenotype.id) ax1.title.set_text(fig_title) #main title using this snp. self.drawPvalue(ax1, axe_to_put_pvalue_legend, axe_LD_center_SNP, snps_within_this_region, analysis_method_id2gwr, LD_info, \ which_LD_statistic, draw_LD_relative_to_center_SNP=draw_LD_relative_to_center_SNP, legend_loc=legend_loc) gene_position_cycle = 5 base_y_value = 1 gene_width=0.8 gene_box_text_gap = min_distance*2*0.005 skip_gene_model = False if len(snps_within_this_region.chr_pos_ls)>0: _snps_within_this_region = snps_within_this_region elif len(snps_within_this_region_snpData.chr_pos_ls)>0: _snps_within_this_region = snps_within_this_region_snpData else: skip_gene_model = True if not skip_gene_model: return_data = self.drawGeneModel(axe_gene_model, _snps_within_this_region, gene_annotation, \ candidate_gene_set, gene_width=gene_width, gene_position_cycle=gene_position_cycle, \ base_y_value=base_y_value, gene_box_text_gap=gene_box_text_gap,\ label_gene=label_gene) matrix_of_gene_descriptions = return_data.matrix_of_gene_descriptions gene_model_min_y = base_y_value-gene_width gene_model_max_y = gene_position_cycle + base_y_value -1 + gene_width #"-1" because genes never sit on y=gene_position_cycle + base_y_value if not skip_gene_model: self.drawLD(axe_gene_model, axe_LD, _snps_within_this_region, LD_info, gene_model_min_y=gene_model_min_y,\ gene_model_max_y=gene_model_max_y, which_LD_statistic=which_LD_statistic) if LD_info: self.drawLDLegend(axe_LD_legend, which_LD_statistic) #adjust x, y limits and etc ax1.set_xlim(axe_pvalue_xlim) ax1_ylim = ax1.get_ylim() ax1.set_ylim((0, ax1_ylim[1])) #set ax1 to 0 to sit right above axe_gene_model axe_gene_model.set_ylim((gene_model_min_y, gene_model_max_y)) #LD panel right under gene models if LD_info: axe_LD.set_xlim(ax1.get_xlim()) #make the axe_LD and ax1 within the same X range axe_LD_x_span = (axe_LD.get_xlim()[1]-axe_LD.get_xlim()[0]) axe_LD.set_ylim((-axe_LD_x_span/2., 0)) #has to force here, don't know why. otherwise it's (0,1) axe_LD.set_yticks([]) #remove all Y ticks on LD plot elif snpData: axe_snp_matrix.set_xlim(ax1.get_xlim()) png_data = None svg_data = None png_output_fname = None if len(snps_within_this_region.chr_pos_ls)>0: distance = abs(snps_within_this_region.chr_pos_ls[-1][1] - snps_within_this_region.chr_pos_ls[0][1]) elif len(snps_within_this_region_snpData.chr_pos_ls)>0: distance = abs(snps_within_this_region_snpData.chr_pos_ls[-1][1] - snps_within_this_region_snpData.chr_pos_ls[0][1]) else: distance = 0 if commit: #2008-10-24 png_data = StringIO.StringIO() svg_data = StringIO.StringIO() pylab.savefig(png_data, format='png', dpi=600) if distance<=20000: #save the svg format if less than 80kb pylab.savefig(svg_data, format='svg', dpi=300) else: png_output_fname = '%s.png'%output_fname_prefix pylab.savefig(png_output_fname, dpi=600) if distance<=20000: #save the svg format if less than 80kb pylab.savefig('%s.svg'%output_fname_prefix, dpi=300) if self.debug: pylab.show() del ax1, axe_LD_center_SNP, axe_gene_model, axe_LD, axe_LD_legend sys.stderr.write("Done.\n") after_plot_data = PassingData(png_output_fname=png_output_fname, matrix_of_gene_descriptions=matrix_of_gene_descriptions, \ png_data=png_data,\ svg_data=svg_data,\ snps_within_this_region=snps_within_this_region) return after_plot_data | bdc3752350001c791e90fb2760fcc0578318b113 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9645/bdc3752350001c791e90fb2760fcc0578318b113/DrawSNPRegion.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
5165,
30022,
2503,
13653,
52,
12,
2890,
16,
28825,
67,
2039,
67,
350,
16,
333,
67,
87,
6782,
16,
5500,
67,
11857,
67,
542,
16,
7529,
67,
11495,
16,
28648,
67,
1376,
16,
6285,
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,
3724,
5165,
30022,
2503,
13653,
52,
12,
2890,
16,
28825,
67,
2039,
67,
350,
16,
333,
67,
87,
6782,
16,
5500,
67,
11857,
67,
542,
16,
7529,
67,
11495,
16,
28648,
67,
1376,
16,
6285,
6... |
print 'non-equal optimization events', i, ':', j | print >>infolog, 'non-equal optimization events', i, ':', j | def __init__(self, inputs, outputs, optimizer, mode, accept_inplace = False, function_builder = Function): """ :type inputs: a list of SymbolicInput instances | deb91f2d5cae2437cc6a337e7d08345a79e318b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/deb91f2d5cae2437cc6a337e7d08345a79e318b6/debugmode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4540,
16,
6729,
16,
13066,
16,
1965,
16,
2791,
67,
267,
964,
273,
1083,
16,
445,
67,
9574,
273,
4284,
4672,
3536,
294,
723,
4540,
30,
279,
666,
434,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4540,
16,
6729,
16,
13066,
16,
1965,
16,
2791,
67,
267,
964,
273,
1083,
16,
445,
67,
9574,
273,
4284,
4672,
3536,
294,
723,
4540,
30,
279,
666,
434,
16... |
if nodeid and value != existing: changed[key] = value | if value != existing: props[key] = value else: | def parsePropsFromForm(db, cl, form, nodeid=0): '''Pull properties for the given class out of the form. ''' props = {} changed = {} keys = form.keys() num_re = re.compile('^\d+$') for key in keys: if not cl.properties.has_key(key): continue proptype = cl.properties[key] if isinstance(proptype, hyperdb.String): value = form[key].value.strip() elif isinstance(proptype, hyperdb.Password): value = password.Password(form[key].value.strip()) elif isinstance(proptype, hyperdb.Date): value = date.Date(form[key].value.strip()) elif isinstance(proptype, hyperdb.Interval): value = date.Interval(form[key].value.strip()) elif isinstance(proptype, hyperdb.Link): value = form[key].value.strip() # see if it's the "no selection" choice if value == '-1': # don't set this property continue else: # handle key values link = cl.properties[key].classname if not num_re.match(value): try: value = db.classes[link].lookup(value) except KeyError: raise ValueError, _('property "%(propname)s": ' '%(value)s not a %(classname)s')%{'propname':key, 'value': value, 'classname': link} elif isinstance(proptype, hyperdb.Multilink): value = form[key] if type(value) != type([]): value = [i.strip() for i in value.value.split(',')] else: value = [i.value.strip() for i in value] link = cl.properties[key].classname l = [] for entry in map(str, value): if entry == '': continue if not num_re.match(entry): try: entry = db.classes[link].lookup(entry) except KeyError: raise ValueError, _('property "%(propname)s": ' '"%(value)s" not an entry of %(classname)s')%{ 'propname':key, 'value': entry, 'classname': link} l.append(entry) l.sort() value = l props[key] = value # get the old value if nodeid: try: existing = cl.get(nodeid, key) except KeyError: # this might be a new property for which there is no existing # value if not cl.properties.has_key(key): raise # if changed, set it if nodeid and value != existing: changed[key] = value props[key] = value return props, changed | 3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
5047,
1265,
1204,
12,
1966,
16,
927,
16,
646,
16,
756,
350,
33,
20,
4672,
9163,
9629,
1790,
364,
326,
864,
667,
596,
434,
326,
646,
18,
9163,
3458,
273,
2618,
3550,
273,
2618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
5047,
1265,
1204,
12,
1966,
16,
927,
16,
646,
16,
756,
350,
33,
20,
4672,
9163,
9629,
1790,
364,
326,
864,
667,
596,
434,
326,
646,
18,
9163,
3458,
273,
2618,
3550,
273,
2618,
... |
if outgoingAccount is None or not outgoingAccount.isSetUp(): | if outgoingAccount is None or not outgoingAccount.isSetUp(ignorePassword): | def getCurrentOutgoingAccount(view): """ This function returns the default C{OutgoingAccount} account or the first C{OutgoingAccount} found if no default exists. @return C{OutgoingAccount} or None """ outgoingAccount = None # Get the current SMTP Account outgoingAccount = schema.ns('osaf.pim', view).currentOutgoingAccount.item if outgoingAccount is None or not outgoingAccount.isSetUp(): for account in OutgoingAccount.iterItems(view): if account.isSetUp(): return account return outgoingAccount | da69f378e03cd4ad2f57bb44acaad5e047e5bd57 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/da69f378e03cd4ad2f57bb44acaad5e047e5bd57/mail.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5175,
24866,
3032,
12,
1945,
4672,
3536,
1220,
445,
1135,
326,
805,
385,
95,
24866,
3032,
97,
2236,
578,
326,
1122,
385,
95,
24866,
3032,
97,
1392,
309,
1158,
805,
1704,
18,
225,
632,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5175,
24866,
3032,
12,
1945,
4672,
3536,
1220,
445,
1135,
326,
805,
385,
95,
24866,
3032,
97,
2236,
578,
326,
1122,
385,
95,
24866,
3032,
97,
1392,
309,
1158,
805,
1704,
18,
225,
632,
... |
jobAttrNames = [] | jobAttrNames = [] | def insertNewJobIntoDB(self, JDL, owner, ownerDN, ownerGroup, diracSetup ): """ Insert the initial JDL into the Job database, Do initial JDL crosscheck, Set Initial job Attributes and Status """ | 99c1bc850ba087890925b3180df206f65bb1d4b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/99c1bc850ba087890925b3180df206f65bb1d4b3/JobDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
1908,
2278,
5952,
2290,
12,
2890,
16,
804,
8914,
16,
3410,
16,
3410,
8609,
16,
3410,
1114,
16,
4314,
8836,
7365,
262,
30,
3536,
8040,
326,
2172,
804,
8914,
1368,
326,
3956,
2063,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2243,
1908,
2278,
5952,
2290,
12,
2890,
16,
804,
8914,
16,
3410,
16,
3410,
8609,
16,
3410,
1114,
16,
4314,
8836,
7365,
262,
30,
3536,
8040,
326,
2172,
804,
8914,
1368,
326,
3956,
2063,
... |
self.cr.execute("SELECT sum(amount) FROM account_analytic_line \ | self.cr.execute("SELECT COALESCE(sum(amount),0.0) FROM account_analytic_line \ | def _move_sum(self, account_id, date1, date2, option): if account_id not in self.acc_data_dict: account_analytic_obj = self.pool.get('account.analytic.account') ids = account_analytic_obj.search(self.cr, self.uid,[('parent_id', 'child_of', [account_id])]) self.acc_data_dict[account_id] = ids else: ids = self.acc_data_dict[account_id] | 49c75feee78ae23fad12924fec92ee41d69a6e7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/49c75feee78ae23fad12924fec92ee41d69a6e7e/analytic_balance.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
8501,
67,
1364,
12,
2890,
16,
2236,
67,
350,
16,
1509,
21,
16,
1509,
22,
16,
1456,
4672,
309,
2236,
67,
350,
486,
316,
365,
18,
8981,
67,
892,
67,
1576,
30,
2236,
67,
304,
783... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8501,
67,
1364,
12,
2890,
16,
2236,
67,
350,
16,
1509,
21,
16,
1509,
22,
16,
1456,
4672,
309,
2236,
67,
350,
486,
316,
365,
18,
8981,
67,
892,
67,
1576,
30,
2236,
67,
304,
783... |
wasempty = repo.changelog.count() == 0 | def pull(ui, repo, source="default", **opts): """pull changes from the specified source Pull changes from a remote repository to a local one. This finds all changes from the repository at the specified path or URL and adds them to the local repository. By default, this does not update the copy of the project in the working directory. Valid URLs are of the form: local/filesystem/path (or file://local/filesystem/path) http://[user@]host[:port]/[path] https://[user@]host[:port]/[path] ssh://[user@]host[:port]/[path] static-http://host[:port]/[path] Paths in the local filesystem can either point to Mercurial repositories or to bundle files (as created by 'hg bundle' or 'hg incoming --bundle'). The static-http:// protocol, albeit slow, allows access to a Mercurial repository where you simply use a web server to publish the .hg directory as static content. An optional identifier after # indicates a particular branch, tag, or changeset to pull. Some notes about using SSH with Mercurial: - SSH requires an accessible shell account on the destination machine and a copy of hg in the remote path or specified with as remotecmd. - path is relative to the remote user's home directory by default. Use an extra slash at the start of a path to specify an absolute path: ssh://example.com//tmp/repository - Mercurial doesn't use its own compression via SSH; the right thing to do is to configure it in your ~/.ssh/config, e.g.: Host *.mylocalnetwork.example.com Compression no Host * Compression yes Alternatively specify "ssh -C" as your ssh command in your hgrc or with the --ssh command line option. """ source, revs = cmdutil.parseurl(ui.expandpath(source), opts['rev']) cmdutil.setremoteconfig(ui, opts) other = hg.repository(ui, source) ui.status(_('pulling from %s\n') % (source)) if revs: if 'lookup' in other.capabilities: revs = [other.lookup(rev) for rev in revs] else: error = _("Other repository doesn't support revision lookup, so a rev cannot be specified.") raise util.Abort(error) wasempty = repo.changelog.count() == 0 modheads = repo.pull(other, heads=revs, force=opts['force']) return postincoming(ui, repo, modheads, opts['update'], wasempty) | 78f57f9179983a87375af6bdd7e703bb47564a62 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/78f57f9179983a87375af6bdd7e703bb47564a62/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6892,
12,
4881,
16,
3538,
16,
1084,
1546,
1886,
3113,
2826,
4952,
4672,
3536,
13469,
3478,
628,
326,
1269,
1084,
225,
14899,
3478,
628,
279,
2632,
3352,
358,
279,
1191,
1245,
18,
225,
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,
6892,
12,
4881,
16,
3538,
16,
1084,
1546,
1886,
3113,
2826,
4952,
4672,
3536,
13469,
3478,
628,
326,
1269,
1084,
225,
14899,
3478,
628,
279,
2632,
3352,
358,
279,
1191,
1245,
18,
225,
12... | |
resp, content = h.request("https://www.google.com/accounts/ClientLogin", method="POST", body=urlencode(auth), headers={'Content-Type': 'application/x-www-form-urlencoded'}) self.Auth = "" if resp < 300: lines = content.split('\n') d = dict([tuple(line.split("=")) for line in lines if line]) self.Auth = d['Auth'] | resp, content = self.http.request("https://www.google.com/accounts/ClientLogin", method="POST", body=urlencode(auth), headers={'Content-Type': 'application/x-www-form-urlencoded'}) lines = content.split('\n') d = dict([tuple(line.split("=")) for line in lines if line]) self.Auth = d['Auth'] print self.Auth | def __init__(self, credentials, host, request_uri, headers, response, content, http): from urllib import urlencode Authentication.__init__(self, credentials, host, request_uri, headers, response, content, http) | 5a190fe782ff9dd6d5a4431ca1146b91a4ea5d72 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13138/5a190fe782ff9dd6d5a4431ca1146b91a4ea5d72/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4448,
16,
1479,
16,
590,
67,
1650,
16,
1607,
16,
766,
16,
913,
16,
1062,
4672,
628,
11527,
1930,
9922,
8665,
16186,
2738,
972,
12,
2890,
16,
4448,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4448,
16,
1479,
16,
590,
67,
1650,
16,
1607,
16,
766,
16,
913,
16,
1062,
4672,
628,
11527,
1930,
9922,
8665,
16186,
2738,
972,
12,
2890,
16,
4448,
16,
... |
self.selenium.wait_for_condition(self._selenium_page_timeout) | self.selenium.wait_for_condition('window.selenium_ready == true', self._selenium_page_timeout) | def check_result(user): "Check if the user is alone in the result list" #Also check if the the results are right assert self.selenium.get_text(\ "//table[contains(@class, 'datatable')]/tbody/tr[last()]//td[2]") ==\ user | 3854ddea6daf9f7a878c454fe8eea6a14eb629ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/3854ddea6daf9f7a878c454fe8eea6a14eb629ef/test_user_management.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2088,
12,
1355,
4672,
315,
1564,
309,
326,
729,
353,
24068,
316,
326,
563,
666,
6,
468,
1067,
2048,
866,
309,
326,
326,
1686,
854,
2145,
1815,
365,
18,
1786,
17327,
18,
588,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
2088,
12,
1355,
4672,
315,
1564,
309,
326,
729,
353,
24068,
316,
326,
563,
666,
6,
468,
1067,
2048,
866,
309,
326,
326,
1686,
854,
2145,
1815,
365,
18,
1786,
17327,
18,
588,
... |
object = locate(key, forceload) except ErrorDuringImport, value: | object, name = resolve(thing, forceload) page = html.page(describe(object), html.document(object, name)) file = open(name + '.html', 'w') file.write(page) file.close() print 'wrote', name + '.html' except (ImportError, ErrorDuringImport), value: | def writedoc(key, forceload=0): """Write HTML documentation to a file in the current directory.""" try: object = locate(key, forceload) except ErrorDuringImport, value: print value else: if object: page = html.page(describe(object), html.document(object, object.__name__)) file = open(key + '.html', 'w') file.write(page) file.close() print 'wrote', key + '.html' else: print 'no Python documentation found for %s' % repr(key) | cde41bcc25c9cb64e7aa3b9b560c2d73c44c5044 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/cde41bcc25c9cb64e7aa3b9b560c2d73c44c5044/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
329,
504,
12,
856,
16,
364,
2183,
6189,
33,
20,
4672,
3536,
3067,
3982,
7323,
358,
279,
585,
316,
326,
783,
1867,
12123,
775,
30,
733,
16,
508,
273,
2245,
12,
4274,
16,
364,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2518,
329,
504,
12,
856,
16,
364,
2183,
6189,
33,
20,
4672,
3536,
3067,
3982,
7323,
358,
279,
585,
316,
326,
783,
1867,
12123,
775,
30,
733,
16,
508,
273,
2245,
12,
4274,
16,
364,
21... |
iterations = iteration.load_from_keyval( iteration_keyval) | def parse_test(cls, job, subdir, testname, status, reason, test_kernel, started_time, finished_time): """Given a job and the basic metadata about the test that can be extracted from the status logs, parse the test keyval files and use it to construct a complete test instance.""" tko_utils.dprint("parsing test %s %s" % (subdir, testname)) | c3eac86d042d34f709381efd37687ad003faba21 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/c3eac86d042d34f709381efd37687ad003faba21/models.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3813,
12,
6429,
16,
1719,
16,
16921,
16,
1842,
529,
16,
1267,
16,
3971,
16,
1842,
67,
8111,
16,
5746,
67,
957,
16,
6708,
67,
957,
4672,
3536,
6083,
279,
1719,
471,
326,
533... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
3813,
12,
6429,
16,
1719,
16,
16921,
16,
1842,
529,
16,
1267,
16,
3971,
16,
1842,
67,
8111,
16,
5746,
67,
957,
16,
6708,
67,
957,
4672,
3536,
6083,
279,
1719,
471,
326,
533... | |
else: self.log_request(self.code) | def handle_data(self): """ Prepare response per incoming GET request. """ path = self.translate_path(self.path) | bc395d1a178d058008c9361c4025ca1641598630 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1918/bc395d1a178d058008c9361c4025ca1641598630/testwebserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
892,
12,
2890,
4672,
3536,
7730,
766,
1534,
6935,
4978,
590,
18,
3536,
589,
273,
365,
18,
13929,
67,
803,
12,
2890,
18,
803,
13,
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,
1640,
67,
892,
12,
2890,
4672,
3536,
7730,
766,
1534,
6935,
4978,
590,
18,
3536,
589,
273,
365,
18,
13929,
67,
803,
12,
2890,
18,
803,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
readmodule_ex(mod, path, inpackage) | _readmodule(mod, path, inpackage) | def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in which we are searching for a submodule, and then PATH must be the package search path; otherwise, we are searching for a top-level module, and PATH is combined with sys.path. ''' # Compute the full module name (prepending inpackage if set) if inpackage: fullmodule = "%s.%s" % (inpackage, module) else: fullmodule = module # Check in the cache if fullmodule in _modules: return _modules[fullmodule] # Initialize the dict for this module's contents dict = {} # Check if it is a built-in module; we don't do much for these if module in sys.builtin_module_names and not inpackage: _modules[module] = dict return dict # Check for a dotted module name i = module.rfind('.') if i >= 0: package = module[:i] submodule = module[i+1:] parent = readmodule_ex(package, path, inpackage) if inpackage: package = "%s.%s" % (inpackage, package) return readmodule_ex(submodule, parent['__path__'], package) # Search the path for the module f = None if inpackage: f, file, (suff, mode, type) = imp.find_module(module, path) else: f, file, (suff, mode, type) = imp.find_module(module, path + sys.path) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] path = [file] + path f, file, (suff, mode, type) = imp.find_module('__init__', [file]) _modules[fullmodule] = dict if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() return dict classstack = [] # stack of (class, indent) pairs g = tokenize.generate_tokens(f.readline) try: for tokentype, token, start, end, line in g: if token == 'def': lineno, thisindent = start tokentype, meth_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] if classstack: # it's a class method cur_class = classstack[-1][0] cur_class._addmethod(meth_name, lineno) else: # it's a function dict[meth_name] = Function(module, meth_name, file, lineno) elif token == 'class': lineno, thisindent = start tokentype, class_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] # parse what follows the class name tokentype, token, start, end, line = g.next() inherit = None if token == '(': names = [] # List of superclasses # there's a list of superclasses level = 1 super = [] # Tokens making up current superclass while True: tokentype, token, start, end, line = g.next() if token in (')', ',') and level == 1: n = "".join(super) if n in dict: # we know this super class n = dict[n] else: c = n.split('.') if len(c) > 1: # super class is of the form # module.class: look in module for # class m = c[-2] c = c[-1] if m in _modules: d = _modules[m] if c in d: n = d[c] names.append(n) if token == '(': level += 1 elif token == ')': level -= 1 if level == 0: break elif token == ',' and level == 1: pass else: super.append(token) inherit = names cur_class = Class(module, class_name, inherit, file, lineno) dict[class_name] = cur_class classstack.append((cur_class, thisindent)) elif token == 'import' and start[1] == 0: modules = _getnamelist(g) for mod, mod2 in modules: try: # Recursively read the imported module if not inpackage: readmodule_ex(mod, path) else: try: readmodule_ex(mod, path, inpackage) except ImportError: readmodule_ex(mod) except: # If we can't find or parse the imported module, # too bad -- don't die here. pass elif token == 'from' and start[1] == 0: mod, token = _getname(g) if not mod or token != "import": continue names = _getnamelist(g) try: # Recursively read the imported module d = readmodule_ex(mod, path, inpackage) except: # If we can't find or parse the imported module, # too bad -- don't die here. continue # add any classes that were defined in the imported module # to our name space if they were mentioned in the list for n, n2 in names: if n in d: dict[n2 or n] = d[n] elif n == '*': # only add a name if not already there (to mimic # what Python does internally) also don't add # names that start with _ for n in d: if n[0] != '_' and not n in dict: dict[n] = d[n] except StopIteration: pass f.close() return dict | 3c6f7106c003622e0bdcd67efc4fb02cbf09adc8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/3c6f7106c003622e0bdcd67efc4fb02cbf09adc8/pyclbr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
2978,
67,
338,
12,
2978,
16,
589,
22850,
6487,
316,
5610,
33,
7036,
4672,
9163,
1994,
279,
1605,
585,
471,
327,
279,
3880,
434,
3318,
18,
225,
5167,
364,
14057,
316,
7767,
471,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
2978,
67,
338,
12,
2978,
16,
589,
22850,
6487,
316,
5610,
33,
7036,
4672,
9163,
1994,
279,
1605,
585,
471,
327,
279,
3880,
434,
3318,
18,
225,
5167,
364,
14057,
316,
7767,
471,
25... |
if 'CHROME_HEADLESS' not in os.environ: jobs = 8 else: jobs = 1 parser.add_option('-j', '--jobs', default=jobs, type='int', | parser.add_option('-j', '--jobs', default=1, type='int', | def Main(argv): """Doesn't parse the arguments here, just find the right subcommand to execute.""" try: # Do it late so all commands are listed. CMDhelp.usage = ('\n\nCommands are:\n' + '\n'.join([ ' %-10s %s' % (fn[3:], Command(fn[3:]).__doc__.split('\n')[0].strip()) for fn in dir(sys.modules[__name__]) if fn.startswith('CMD')])) parser = optparse.OptionParser(version='%prog ' + __version__) # TODO(maruel): Temporary workaround to disable parallel checkout on # buildbots until they can correctly parse its output. stdout being # redirected is not a good signal, at least on linux. Check for environment # variable instead. if 'CHROME_HEADLESS' not in os.environ: jobs = 8 else: jobs = 1 parser.add_option('-j', '--jobs', default=jobs, type='int', help='Specify how many SCM commands can run in parallel; ' 'default=%default') parser.add_option('-v', '--verbose', action='count', default=0, help='Produces additional output for diagnostics. Can be ' 'used up to three times for more logging info.') parser.add_option('--gclientfile', dest='config_filename', default=os.environ.get('GCLIENT_FILE', '.gclient'), help='Specify an alternate %default file') # Integrate standard options processing. old_parser = parser.parse_args def Parse(args): (options, args) = old_parser(args) level = None if options.verbose == 2: level = logging.INFO elif options.verbose > 2: level = logging.DEBUG logging.basicConfig(level=level, format='%(module)s(%(lineno)d) %(funcName)s:%(message)s') options.entries_filename = options.config_filename + '_entries' if options.jobs < 1: parser.error('--jobs must be 1 or higher') # Always autoflush so buildbot doesn't kill us during lengthy operations. options.stdout = gclient_utils.StdoutAutoFlush(sys.stdout) # These hacks need to die. if not hasattr(options, 'revisions'): # GClient.RunOnDeps expects it even if not applicable. options.revisions = [] if not hasattr(options, 'head'): options.head = None if not hasattr(options, 'nohooks'): options.nohooks = True if not hasattr(options, 'deps_os'): options.deps_os = None if not hasattr(options, 'manually_grab_svn_rev'): options.manually_grab_svn_rev = None if not hasattr(options, 'force'): options.force = None return (options, args) parser.parse_args = Parse # We don't want wordwrapping in epilog (usually examples) parser.format_epilog = lambda _: parser.epilog or '' if argv: command = Command(argv[0]) if command: # 'fix' the usage and the description now that we know the subcommand. GenUsage(parser, argv[0]) return command(parser, argv[1:]) # Not a known command. Default to help. GenUsage(parser, 'help') return CMDhelp(parser, argv) except gclient_utils.Error, e: print >> sys.stderr, 'Error: %s' % str(e) return 1 | bfcde7b84d2afbf37f3369879eef0bb22ce2b103 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/bfcde7b84d2afbf37f3369879eef0bb22ce2b103/gclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12740,
12,
19485,
4672,
3536,
10154,
82,
1404,
1109,
326,
1775,
2674,
16,
2537,
1104,
326,
2145,
18856,
358,
1836,
12123,
775,
30,
468,
2256,
518,
26374,
1427,
777,
4364,
854,
12889,
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,
12740,
12,
19485,
4672,
3536,
10154,
82,
1404,
1109,
326,
1775,
2674,
16,
2537,
1104,
326,
2145,
18856,
358,
1836,
12123,
775,
30,
468,
2256,
518,
26374,
1427,
777,
4364,
854,
12889,
18,
... |
request.session['cart'] = saved_cart.id | request.session['cart'] = saved_cart.id | def _get_prev_cart(request): try: contact = request.user.contact_set.get() saved_cart = contact.cart_set.latest('date_time_created') # If the latest cart has len == 0, cart is unusable. if len(saved_cart) and request.session['cart']: # Merge the two carts together existing_cart = Cart.objects.from_request(request, create=False) saved_cart.merge_carts(existing_cart) request.session['cart'] = saved_cart.id except Exception, e: pass | 2c737e5c2d440bae9741fe8d3afdbe6985bc174b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13656/2c737e5c2d440bae9741fe8d3afdbe6985bc174b/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
10001,
67,
11848,
12,
2293,
4672,
775,
30,
5388,
273,
590,
18,
1355,
18,
8994,
67,
542,
18,
588,
1435,
5198,
67,
11848,
273,
5388,
18,
11848,
67,
542,
18,
13550,
2668,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
67,
10001,
67,
11848,
12,
2293,
4672,
775,
30,
5388,
273,
590,
18,
1355,
18,
8994,
67,
542,
18,
588,
1435,
5198,
67,
11848,
273,
5388,
18,
11848,
67,
542,
18,
13550,
2668,
... |
self.command = ["./tests/mozilla.org/js/runtests.sh", | self.command = ["tests/mozilla.org/js/runtests.sh", | def start(self): self.command = ["./tests/mozilla.org/js/runtests.sh", "-p", self.product, "-b", self.branch, "-T", self.buildType, "-B", "checkout-build", "-c", "-S"] CygwinBashShellCommand.start(self) | 662527b0513ece0406b0345393486e9b1c7507a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/662527b0513ece0406b0345393486e9b1c7507a6/sisyphus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
365,
18,
3076,
273,
8247,
16341,
19,
8683,
15990,
18,
3341,
19,
2924,
19,
2681,
16341,
18,
674,
3113,
3701,
84,
3113,
365,
18,
5896,
16,
3701,
70,
3113,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
787,
12,
2890,
4672,
365,
18,
3076,
273,
8247,
16341,
19,
8683,
15990,
18,
3341,
19,
2924,
19,
2681,
16341,
18,
674,
3113,
3701,
84,
3113,
365,
18,
5896,
16,
3701,
70,
3113,
365,
18,
... |
"""define a result-column processing function.""" | """Defines a result-column processing function.""" | def result_processor(self, dialect): """define a result-column processing function.""" return None | d154266a652f0486fbf004ceb6e0223d6f3e0997 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/d154266a652f0486fbf004ceb6e0223d6f3e0997/types.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
563,
67,
8700,
12,
2890,
16,
10864,
4672,
3536,
15109,
279,
563,
17,
2827,
4929,
445,
12123,
225,
327,
599,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
563,
67,
8700,
12,
2890,
16,
10864,
4672,
3536,
15109,
279,
563,
17,
2827,
4929,
445,
12123,
225,
327,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
str = 'ISA*00* *00* *ZZ*ZZ000 *ZZ*ZZ001 *030828*1128*U*00401*000010121*0*T*:~\n' str += 'GS*HC*ZZ000*ZZ001*20030828*1128*17*X*004010X098~\n' str += 'GE*0*17~\n' str += 'IEA*2*000010121~\n' (err_cde, err_str) = self._get_first_error(str) | str1 = 'ISA*00* *00* *ZZ*ZZ000 *ZZ*ZZ001 *030828*1128*U*00401*000010121*0*T*:~\n' str1 += 'GS*HC*ZZ000*ZZ001*20030828*1128*17*X*004010X098~\n' str1 += 'GE*0*17~\n' str1 += 'IEA*2*000010121~\n' (err_cde, err_str) = self._get_first_error(str1) | def test_IEA_count(self): seg = None str = 'ISA*00* *00* *ZZ*ZZ000 *ZZ*ZZ001 *030828*1128*U*00401*000010121*0*T*:~\n' str += 'GS*HC*ZZ000*ZZ001*20030828*1128*17*X*004010X098~\n' str += 'GE*0*17~\n' str += 'IEA*2*000010121~\n' (err_cde, err_str) = self._get_first_error(str) self.assertEqual(err_cde, '021', err_str) | 1433c380fc3bf2e7c5ac05b385e1b69e19134b72 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11528/1433c380fc3bf2e7c5ac05b385e1b69e19134b72/x12file.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
8732,
37,
67,
1883,
12,
2890,
4672,
2291,
273,
599,
609,
21,
273,
296,
5127,
37,
14,
713,
14,
1850,
380,
713,
14,
1850,
380,
27096,
14,
27096,
3784,
1850,
380,
27096,
14,
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,
1842,
67,
8732,
37,
67,
1883,
12,
2890,
4672,
2291,
273,
599,
609,
21,
273,
296,
5127,
37,
14,
713,
14,
1850,
380,
713,
14,
1850,
380,
27096,
14,
27096,
3784,
1850,
380,
27096,
14,
2... |
"SPARC32_LINUX" : "-32", "SPARC64_LINUX" : "-64", "LINUXLIBC6" : "--32", "AMD64_LINUX" : "--64" | "AMD64_LINUX" : " --64 ", "LINUXLIBC6" : " --32 ", "SPARC32_LINUX" : " -32 ", "SPARC64_LINUX" : " -64 ", | def Boot(): global BuildLocal BuildLocal += " -boot -keep" Version = "1" Compile = ("gcc -gstabs+ " + ({ "SPARC32_LINUX" : "-m32 -munaligned-doubles", "SPARC64_LINUX" : "-m64 -munaligned-doubles", "LINUXLIBC6" : "-m32 -fPIC -mno-align-double", "AMD64_LINUX" : "-m64 -fPIC -mno-align-double" }.get(Target) or "")) Link = (Compile + " " + ({ "PPC32_OPENBSD" : "-lm -lpthread", "SPARC64_OPENBSD" : "-lm -lpthread" }.get(Target) or "")) Assemble = ("as " + ({ "SPARC32_LINUX" : "-32", "SPARC64_LINUX" : "-64", "LINUXLIBC6" : "--32", "AMD64_LINUX" : "--64" }.get(Target) or "")) BootDir = "/cm3-boot-POSIX-" + Target + "-" + Version P = [ "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] if Target == "NT386": P += ["mklib"] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) if os.path.isdir(BootDir): shutil.rmtree(BootDir) os.mkdir(BootDir) # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") MakeVerbose = open(os.path.join(BootDir, "makeverbose.sh"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") Makefile.write("all: cm3\nAssemble=" + Assemble + "\nCompile=" + Compile + "\nLink=" + Link + "\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): if (a.endswith(".ms") or a.endswith(".is") or a.endswith(".c")): CopyFile(os.path.join(Root, dir, Config, a), BootDir) Makefile.write("Objects += " + a + ".o\n" + a + ".o: " + a + "\n\t") if a.endswith(".c"): Make.write(Compile + " -c " + a + "\n") MakeVerbose.write("echo " + Compile + " -c " + a + "\n") MakeVerbose.write(Compile + " -C " + a + "\n") Makefile.write("$(Compile) -c " + a + "\n") else: Make.write(Assemble + " " + a + " -o " + a + ".o\n") MakeVerbose.write("echo " + Assemble + " " + a + " -o " + a + ".o\n") MakeVerbose.write(Assemble + " " + a + " -o " + a + ".o\n") Makefile.write("$(Assemble) " + a + " -o " + a + ".o\n") if a.endswith(".h"): CopyFile(os.path.join(Root, dir, Config, a), BootDir) Makefile.write("cm3: $(Objects)\n\t$(Link) -o cm3 *.o\n") Make.write(Link + " -o cm3 *.o\n") MakeVerbose.write("echo " + Link + " -o cm3 *.o\n") MakeVerbose.write(Link + " -o cm3 *.o\n") Make.close() Makefile.close() MakeVerbose.close() os.chdir("/") _MakeArchive(BootDir[1:]) | 5ede0f80a9877b27e6fe73475bd5c595c157b542 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9328/5ede0f80a9877b27e6fe73475bd5c595c157b542/pylib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26254,
13332,
225,
2552,
3998,
2042,
3998,
2042,
1011,
315,
300,
7137,
300,
10102,
6,
225,
4049,
273,
315,
21,
6,
225,
16143,
273,
7566,
75,
952,
300,
75,
334,
5113,
15,
315,
397,
1079... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26254,
13332,
225,
2552,
3998,
2042,
3998,
2042,
1011,
315,
300,
7137,
300,
10102,
6,
225,
4049,
273,
315,
21,
6,
225,
16143,
273,
7566,
75,
952,
300,
75,
334,
5113,
15,
315,
397,
1079... |
return env.ComponentProgram(*args, **kw) | result = env.ComponentProgram(*args, **kw) if env.get('INCREMENTAL'): env.Precious(result) return result | def ChromeProgram(env, *args, **kw): return env.ComponentProgram(*args, **kw) | 0321bab8ae0e152a93f1e50e353cc9d2a9c50345 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5060/0321bab8ae0e152a93f1e50e353cc9d2a9c50345/chromium_builders.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15159,
9459,
12,
3074,
16,
380,
1968,
16,
2826,
9987,
4672,
327,
1550,
18,
1841,
9459,
30857,
1968,
16,
2826,
9987,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
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,
15159,
9459,
12,
3074,
16,
380,
1968,
16,
2826,
9987,
4672,
327,
1550,
18,
1841,
9459,
30857,
1968,
16,
2826,
9987,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
chunk_strand, num_strands = memo | group_color, chunk_strand, num_strands = memo | def drawStrand(points, colors, radii, color_style, shape, arrows): """ Renders a strand shape along points array using colors and radii arrays, optionally with arrows. """ n = len(points) if n>3: # copy colors and radii colors[0] = colors[1] colors[n-1] = colors[n-2] radii[0] = radii[1] radii[n-1] = radii[n-2] # draw the terminal spheres drawer.drawsphere(colors[1],points[1],radii[1],2) drawer.drawsphere(colors[n-2],points[n-2],radii[1],2) if shape==1: # draw cylinders gleSetJoinStyle(TUBE_JN_ROUND | TUBE_NORM_PATH_EDGE | TUBE_JN_CAP | TUBE_CONTOUR_CLOSED) #drawer.drawpolycone(colors[1], # points, # radii) if color_style==1: drawer.drawpolycone_multicolor(colors[1], points, colors, radii) else: drawer.drawpolycone(colors[1], points, radii) elif shape==2: # draw spline tube gleSetJoinStyle(TUBE_JN_ANGLE | TUBE_NORM_PATH_EDGE | TUBE_JN_CAP | TUBE_CONTOUR_CLOSED) new_points = zeros([4*(n-2)-1,3],Float) new_colors = zeros([4*(n-2)-1,3],Float) new_radii = zeros([4*(n-2)-1],Float) o = 1 for p in range (1,n-2): for m in range (0,4): t = float(m)/4.0 new_points[o] = self.spline(points, p, t) new_colors[o] = self.spline(colors, p, t) new_radii[o] = self.spline(radii, p, t) o += 1 new_points[o] = self.spline(points, p, 1.0) new_colors[o] = self.spline(colors, p, 1.0) new_radii[o] = self.spline(radii, p, 1.0) o += 1 new_points[0] = 3.0*new_points[1]-3.0*new_points[2]+new_points[3] new_points[o] = 3.0*new_points[o-1]-3.0*new_points[o-2]+new_points[o-3] # draw the tube if color_style==1: drawer.drawpolycone_multicolor( colors[1], new_points, new_colors, new_radii) else: drawer.drawpolycone( colors[1], new_points, new_radii) # draw the arrows if arrows==1 or arrows==3: # 5' drawer.drawpolycone(colors[1], [points[1], points[1], 2.0*points[1]-points[2], 2.0*points[1]-points[2]], [radii[1]*2.0, radii[1]*2.0, 0.0, 0.0]) if arrows==2 or arrows==3: # 3' drawer.drawpolycone(colors[n-2], [points[n-2], points[n-2], 2.0*points[n-2]-points[n-3], 2.0*points[n-2]-points[n-3]], [radii[1]*2.0, radii[1]*2.0, 0.0, 0.0]) | 5b5c4d84777d384de95dbe6447399904efade488 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/5b5c4d84777d384de95dbe6447399904efade488/DnaCylinderChunks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3724,
1585,
464,
12,
4139,
16,
5740,
16,
28125,
16,
2036,
67,
4060,
16,
2179,
16,
419,
3870,
4672,
3536,
534,
10130,
279,
16706,
2179,
7563,
3143,
526,
1450,
5740,
471,
28125,
5352,
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,
3724,
1585,
464,
12,
4139,
16,
5740,
16,
28125,
16,
2036,
67,
4060,
16,
2179,
16,
419,
3870,
4672,
3536,
534,
10130,
279,
16706,
2179,
7563,
3143,
526,
1450,
5740,
471,
28125,
5352,
16,
... |
if cls._parser is None: | if cls._xml_parser is None: | def __init__(cls, name, bases, dct): if cls._xml_schema is None and cls._xml_schema_file is not None: cls._xml_schema = etree.XMLSchema(etree.parse(open(os.path.join(cls._xml_schema_dir, cls._xml_schema_file), 'r'))) if cls._parser is None: if cls._xml_schema is not None and cls._validate_input: cls._parser = etree.XMLParser(schema=cls._xml_schema, **cls._parser_opts) else: cls._parser = etree.XMLParser(**cls._parser_opts) | b58735788a7c14cafeb8fb076c083d01782d57f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/b58735788a7c14cafeb8fb076c083d01782d57f9/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
6429,
16,
508,
16,
8337,
16,
18253,
4672,
309,
2028,
6315,
2902,
67,
4821,
353,
599,
471,
2028,
6315,
2902,
67,
4821,
67,
768,
353,
486,
599,
30,
2028,
6315,
2902,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6429,
16,
508,
16,
8337,
16,
18253,
4672,
309,
2028,
6315,
2902,
67,
4821,
353,
599,
471,
2028,
6315,
2902,
67,
4821,
67,
768,
353,
486,
599,
30,
2028,
6315,
2902,... |
elif exp.hours > 0: ret = "%d hours" % exp.hours | elif exp.seconds > 3600: ret = "%d hours" % (exp.seconds/3600) | def getExpirationTime(self): ret = "???" self.beginRead() self.feed.beginRead() try: if self.feed.expire == "never": ret = "never" else: if self.feed.expire == "feed": expireTime = self.feed.expireTime elif self.feed.expire == "system": expireTime = config.get('DefaultTimeUntilExpiration') exp = expireTime - (datetime.now() - self.getDownloadedTime()) if exp.days > 0: ret = "%d days" % exp.days elif exp.hours > 0: ret = "%d hours" % exp.hours else: ret = "%d minutes" % exp.minutes finally: self.feed.endRead() self.endRead() return ret | 1a163c99c9dd5425c61502c052adda1f60b91bed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/1a163c99c9dd5425c61502c052adda1f60b91bed/item.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12028,
950,
12,
2890,
4672,
325,
273,
315,
14646,
7225,
365,
18,
10086,
1994,
1435,
365,
18,
7848,
18,
10086,
1994,
1435,
775,
30,
309,
365,
18,
7848,
18,
14070,
422,
315,
4644,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
12028,
950,
12,
2890,
4672,
325,
273,
315,
14646,
7225,
365,
18,
10086,
1994,
1435,
365,
18,
7848,
18,
10086,
1994,
1435,
775,
30,
309,
365,
18,
7848,
18,
14070,
422,
315,
4644,
5... |
(r'(<[^>]*>)', Name.Variable), | (r'(<[^>]+>)', Name.Variable), | def word_callback(lexer, match): word = match.group() | 62dc21c6d9cb730b49b7ae54d83eef5f19503ea6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2885/62dc21c6d9cb730b49b7ae54d83eef5f19503ea6/other.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2076,
67,
3394,
12,
31731,
16,
845,
4672,
2076,
273,
845,
18,
1655,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2076,
67,
3394,
12,
31731,
16,
845,
4672,
2076,
273,
845,
18,
1655,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if args.has_key('valign'): value = args['valign'].strip('"') | if argsdict.has_key('valign'): value = argsdict['valign'].strip('"') | def _handleSimpleCellAttributes(self, element, args): safe_values_for = {'valign': ('top', 'middle', 'bottom'), 'align': ('left', 'center', 'right'), } if not args: return assert(element.nodeName == "entry") | 1433435f169a98600ed153334470f8365d04459c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/1433435f169a98600ed153334470f8365d04459c/text_docbook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
5784,
4020,
2498,
12,
2890,
16,
930,
16,
833,
4672,
4183,
67,
2372,
67,
1884,
273,
13666,
1125,
724,
4278,
7707,
3669,
2187,
296,
18661,
2187,
296,
9176,
19899,
296,
7989,
427... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4110,
5784,
4020,
2498,
12,
2890,
16,
930,
16,
833,
4672,
4183,
67,
2372,
67,
1884,
273,
13666,
1125,
724,
4278,
7707,
3669,
2187,
296,
18661,
2187,
296,
9176,
19899,
296,
7989,
427... |
return True | def _CreateBlockDevOnPrimary(lu, node, instance, device, info): """Create a tree of block devices on the primary node. This always creates all devices. """ if device.children: for child in device.children: if not _CreateBlockDevOnPrimary(lu, node, instance, child, info): return False lu.cfg.SetDiskID(device, node) new_id = lu.rpc.call_blockdev_create(node, device, device.size, instance.name, True, info) if new_id.failed or not new_id.data: return False if device.physical_id is None: device.physical_id = new_id return True | 796cab27f717490434cf75036dab7bc09cf0167d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/796cab27f717490434cf75036dab7bc09cf0167d/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1684,
1768,
8870,
1398,
6793,
12,
28832,
16,
756,
16,
791,
16,
2346,
16,
1123,
4672,
3536,
1684,
279,
2151,
434,
1203,
7166,
603,
326,
3354,
756,
18,
225,
1220,
3712,
3414,
777,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1684,
1768,
8870,
1398,
6793,
12,
28832,
16,
756,
16,
791,
16,
2346,
16,
1123,
4672,
3536,
1684,
279,
2151,
434,
1203,
7166,
603,
326,
3354,
756,
18,
225,
1220,
3712,
3414,
777,
7... | |
attachment_names = [mi.title+os.path.splitext(attachment)[1]] | attachment_names = [ascii_filename(mi.title)+os.path.splitext(attachment)[1]] | def email_news(self, id): opts = email_config().parse() accounts = [(account, [x.strip().lower() for x in x[0].split(',')]) for account, x in opts.accounts.items() if x[1]] sent_mails = [] for account, fmts in accounts: files, auto = self.library_view.model().\ get_preferred_formats_from_ids([id], fmts) files = [f for f in files if f is not None] if not files: continue attachment = files[0] mi = self.library_view.model().db.get_metadata(id, index_is_id=True) to_s = [account] subjects = [_('News:')+' '+mi.title] texts = [_('Attached is the')+' '+mi.title] attachment_names = [mi.title+os.path.splitext(attachment)[1]] attachments = [attachment] jobnames = ['%s:%s'%(id, mi.title)] remove = [id] if config['delete_news_from_library_on_upload']\ else [] self.emailer.send_mails(jobnames, Dispatcher(partial(self.emails_sent, remove=remove)), attachments, to_s, subjects, texts, attachment_names) sent_mails.append(to_s[0]) if sent_mails: self.status_bar.show_message(_('Sent news to')+' '+\ ', '.join(sent_mails), 3000) | cf695db7cc6adea1ff64ff83b9cd85c068c891e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/cf695db7cc6adea1ff64ff83b9cd85c068c891e2/device.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2699,
67,
18443,
12,
2890,
16,
612,
4672,
1500,
273,
2699,
67,
1425,
7675,
2670,
1435,
9484,
273,
306,
12,
4631,
16,
306,
92,
18,
6406,
7675,
8167,
1435,
364,
619,
316,
619,
63,
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,
2699,
67,
18443,
12,
2890,
16,
612,
4672,
1500,
273,
2699,
67,
1425,
7675,
2670,
1435,
9484,
273,
306,
12,
4631,
16,
306,
92,
18,
6406,
7675,
8167,
1435,
364,
619,
316,
619,
63,
20,
... |
package.part_count = util.countBitsOn(pkgId) | def _getPackageClasses(self, parts): # Generating list of all classes allClasses = {} for part in parts.values(): for classId in part.deps: allClasses[classId] = True | 1cfd1ed58337950233d32892a0095dbf1ce44a81 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/1cfd1ed58337950233d32892a0095dbf1ce44a81/PartBuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
2261,
4818,
12,
2890,
16,
2140,
4672,
468,
3055,
1776,
666,
434,
777,
3318,
777,
4818,
273,
2618,
364,
1087,
316,
2140,
18,
2372,
13332,
364,
31181,
316,
1087,
18,
14877,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
588,
2261,
4818,
12,
2890,
16,
2140,
4672,
468,
3055,
1776,
666,
434,
777,
3318,
777,
4818,
273,
2618,
364,
1087,
316,
2140,
18,
2372,
13332,
364,
31181,
316,
1087,
18,
14877,
30,
... | |
print runner.getMotorsMne() | def accept(self): self.save() QtGui.QDialog.accept(self) | 2e2880c1cb7419dd9d1529a2f5960fb49fab6d49 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14949/2e2880c1cb7419dd9d1529a2f5960fb49fab6d49/specconnect.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2791,
12,
2890,
4672,
365,
18,
5688,
1435,
23425,
18,
53,
6353,
18,
9436,
12,
2890,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
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,
2791,
12,
2890,
4672,
365,
18,
5688,
1435,
23425,
18,
53,
6353,
18,
9436,
12,
2890,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... | |
MelString('ICON','maleIconPath'), MelString('MICO','maleIcon'), | MelString('ICON','maleLargeIconPath'), MelString('MICO','maleSmallIconPath'), | # def __init__(self,attr='model',index=0): | aeca1db1240364fac710811ccc7f19b3a36b644a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/aeca1db1240364fac710811ccc7f19b3a36b644a/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
468,
377,
1652,
1001,
2738,
972,
12,
2890,
16,
1747,
2218,
2284,
2187,
1615,
33,
20,
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,
... | [
1,
1,
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,
468,
377,
1652,
1001,
2738,
972,
12,
2890,
16,
1747,
2218,
2284,
2187,
1615,
33,
20,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def __sub__(self, right): """ EXAMPLES: sage: R.<t> = LaurentSeriesRing(ZZ) sage: f = t^2 + t^3 + O(t^10) sage: g = 3/t^4 + t^3 + O(t^5) sage: f - g -3*t^-4 + t^2 + O(t^5) sage: g - f 3*t^-4 - t^2 + O(t^5) """ return self + right.__neg__() | def __sub__(self, right): """ EXAMPLES: sage: R.<t> = LaurentSeriesRing(ZZ) sage: f = t^2 + t^3 + O(t^10) sage: g = 3/t^4 + t^3 + O(t^5) sage: f - g -3*t^-4 + t^2 + O(t^5) sage: g - f 3*t^-4 - t^2 + O(t^5) """ return self + right.__neg__() | acdbb1f44bbf2a1793210dbbd31b6ec510ad7056 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/acdbb1f44bbf2a1793210dbbd31b6ec510ad7056/laurent_series_ring_element.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
1717,
972,
12,
2890,
16,
2145,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
534,
22782,
88,
34,
273,
511,
8377,
547,
6485,
10369,
12,
27096,
13,
272,
410,
30,
284,
273,
268,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1717,
972,
12,
2890,
16,
2145,
4672,
3536,
5675,
8900,
11386,
30,
272,
410,
30,
534,
22782,
88,
34,
273,
511,
8377,
547,
6485,
10369,
12,
27096,
13,
272,
410,
30,
284,
273,
268,
... | |
output = misc.Run(self.dhclient_cmd + " --version", include_stderr=True) if '4.' in output: self.dhclient_needs_verbose = True else: self.dhclient_needs_verbose = False | if self.dhclient_cmd != None: output = misc.Run(self.dhclient_cmd + " --version", include_stderr=True) if '4.' in output: self.dhclient_needs_verbose = True else: self.dhclient_needs_verbose = False | def CheckDHCP(self): """ Check for the existence of valid DHCP clients. Checks for the existence of a supported DHCP client. If one is found, the appropriate values for DHCP_CMD, DHCP_RELEASE, and DHCP_CLIENT are set. If a supported client is not found, a warning is printed. """ self.dhclient_cmd = self._find_program_path("dhclient") output = misc.Run(self.dhclient_cmd + " --version", include_stderr=True) if '4.' in output: self.dhclient_needs_verbose = True else: self.dhclient_needs_verbose = False self.dhcpcd_cmd = self._find_program_path("dhcpcd") self.pump_cmd = self._find_program_path("pump") | 72e6bb73de7b91825b17b43c6a8bf560eb39987c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12280/72e6bb73de7b91825b17b43c6a8bf560eb39987c/wnettools.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
16501,
4258,
12,
2890,
4672,
3536,
2073,
364,
326,
15782,
434,
923,
24141,
4258,
7712,
18,
225,
13074,
364,
326,
15782,
434,
279,
3260,
24141,
4258,
1004,
18,
225,
971,
1245,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2073,
16501,
4258,
12,
2890,
4672,
3536,
2073,
364,
326,
15782,
434,
923,
24141,
4258,
7712,
18,
225,
13074,
364,
326,
15782,
434,
279,
3260,
24141,
4258,
1004,
18,
225,
971,
1245,
353,
... |
version = "3.0", | version = "2.40", | def get_file_list (self): super(MySdist, self).get_file_list() self.filelist.append("MANIFEST") | 0296c29f312b852025ac1972d504b1a62be65bc4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/0296c29f312b852025ac1972d504b1a62be65bc4/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
768,
67,
1098,
261,
2890,
4672,
2240,
12,
12062,
55,
4413,
16,
365,
2934,
588,
67,
768,
67,
1098,
1435,
365,
18,
7540,
5449,
18,
6923,
2932,
9560,
30050,
7923,
2,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
768,
67,
1098,
261,
2890,
4672,
2240,
12,
12062,
55,
4413,
16,
365,
2934,
588,
67,
768,
67,
1098,
1435,
365,
18,
7540,
5449,
18,
6923,
2932,
9560,
30050,
7923,
2,
-100,
-100,
... |
listen_port = server.socket.getsockname()[1] print 'FTP server started on port %d...' % listen_port | print 'FTP server started on port %d...' % port | def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): print 'specified server cert file not found: ' + options.cert + \ ' exiting...' return for ca_cert in options.ssl_client_ca: if not os.path.isfile(ca_cert): print 'specified trusted client CA file not found: ' + ca_cert + \ ' exiting...' return server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert, options.ssl_client_auth, options.ssl_client_ca) print 'HTTPS server started on port %d...' % server.server_port else: server = StoppableHTTPServer(('127.0.0.1', port), TestPageHandler) print 'HTTP server started on port %d...' % server.server_port server.data_dir = MakeDataDir() server.file_root_url = options.file_root_url server._sync_handler = None listen_port = server.server_port # means FTP Server else: my_data_dir = MakeDataDir() # Instantiate a dummy authorizer for managing 'virtual' users authorizer = pyftpdlib.ftpserver.DummyAuthorizer() # Define a new user having full r/w permissions and a read-only # anonymous user authorizer.add_user('chrome', 'chrome', my_data_dir, perm='elradfmw') authorizer.add_anonymous(my_data_dir) # Instantiate FTP handler class ftp_handler = pyftpdlib.ftpserver.FTPHandler ftp_handler.authorizer = authorizer # Define a customized banner (string returned when client connects) ftp_handler.banner = ("pyftpdlib %s based ftpd ready." % pyftpdlib.ftpserver.__ver__) # Instantiate FTP server class and listen to 127.0.0.1:port address = ('127.0.0.1', port) server = pyftpdlib.ftpserver.FTPServer(address, ftp_handler) listen_port = server.socket.getsockname()[1] print 'FTP server started on port %d...' % listen_port # Notify the parent that we've started. (BaseServer subclasses # bind their sockets on construction.) if options.startup_pipe is not None: if sys.platform == 'win32': fd = msvcrt.open_osfhandle(options.startup_pipe, 0) else: fd = options.startup_pipe startup_pipe = os.fdopen(fd, "w") # Write the listening port as a 2 byte value. This is _not_ using # network byte ordering since the other end of the pipe is on the same # machine. startup_pipe.write(struct.pack('@H', listen_port)) startup_pipe.close() try: server.serve_forever() except KeyboardInterrupt: print 'shutting down server' server.stop = True | 286adf5ad68b88df9028ab8239ae55c5b2eab81c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/286adf5ad68b88df9028ab8239ae55c5b2eab81c/testserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
2116,
16,
833,
4672,
15204,
273,
1696,
2668,
3813,
3567,
18,
1330,
2187,
296,
91,
6134,
2589,
18,
10283,
273,
1387,
8438,
92,
264,
12,
9499,
18,
10283,
16,
15204,
13,
2589,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16,
833,
4672,
15204,
273,
1696,
2668,
3813,
3567,
18,
1330,
2187,
296,
91,
6134,
2589,
18,
10283,
273,
1387,
8438,
92,
264,
12,
9499,
18,
10283,
16,
15204,
13,
2589,
1... |
print "cpus=", cpus | def __init__(self, name, job_size, job_pid, cpus = None, root = "", cleanup = 1): # Create a cpuset container and move job_pid into it # Allocate the list "cpus" of cpus to that container | 2ac58557e6c7f67ec6179d552758aacdd5e082af /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/2ac58557e6c7f67ec6179d552758aacdd5e082af/cpuset.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
508,
16,
1719,
67,
1467,
16,
1719,
67,
6610,
16,
20620,
273,
599,
16,
1365,
273,
23453,
6686,
273,
404,
4672,
468,
1788,
279,
20620,
278,
1478,
471,
3635... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
16,
508,
16,
1719,
67,
1467,
16,
1719,
67,
6610,
16,
20620,
273,
599,
16,
1365,
273,
23453,
6686,
273,
404,
4672,
468,
1788,
279,
20620,
278,
1478,
471,
3635... | |
""", """\ <document source="test data"> | """ expected_regex = \ r"""^<document source="test data"> | def suite(): s = DocutilsTestSupport.ParserTestSuite() s.generateTests(totest) return s | 890fa949b55831d0ea7841106527db8a18f4fdd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/890fa949b55831d0ea7841106527db8a18f4fdd7/test_include.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11371,
13332,
272,
273,
3521,
5471,
4709,
6289,
18,
2678,
4709,
13587,
1435,
272,
18,
7163,
14650,
12,
3307,
395,
13,
327,
272,
225,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11371,
13332,
272,
273,
3521,
5471,
4709,
6289,
18,
2678,
4709,
13587,
1435,
272,
18,
7163,
14650,
12,
3307,
395,
13,
327,
272,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return {'inv_created' : str(inv_create),'inv_rejected' : str(inv_reject) ,'invoice_ids': list_inv , 'inv_rej_reason': inv_rej_reason} | return {'inv_created' : str(inv_create),'inv_rejected' : str(inv_reject) ,'invoice_ids': list_inv , 'inv_rej_reason': inv_rej_reason } | def _createInvoices(self, cr, uid, data, context): pool_obj = pooler.get_pool(cr.dbname) obj_carnet = pool_obj.get('cci_missions.ata_carnet') data_carnet = obj_carnet.browse(cr,uid,data['ids']) obj_lines=pool_obj.get('account.invoice.line') inv_create = 0 inv_reject = 0 inv_rej_reason = "" list_inv = [] for carnet in data_carnet: list = [] value = [] address_contact = False address_invoice = False create_ids = [] if carnet.invoice_id: inv_reject = inv_reject + 1 inv_rej_reason += "ID "+str(carnet.id)+": Already Has an Invoice Linked \n" continue inv_create = inv_create + 1 list.append(carnet.type_id.original_product_id.id) list.append(carnet.type_id.copy_product_id.id) list.append(carnet.warranty_product_id.id) for product_line in carnet.product_ids:#extra Products val = obj_lines.product_id_change(cr, uid, [], product_line.product_id.id,uom =False, partner_id=carnet.partner_id.id) val['value'].update({'product_id' : product_line.product_id.id }) val['value'].update({'quantity' : product_line.quantity }) val['value'].update({'price_unit':product_line.price_unit}) value.append(val) for add in carnet.partner_id.address: if add.type == 'contact': address_contact = add.id if add.type == 'invoice': address_invoice = add.id if (not address_contact) and (add.type == 'default'): address_contact = add.id if (not address_invoice) and (add.type == 'default'): address_invoice = add.id if not address_contact or not address_invoice: inv_reject = inv_reject + 1 inv_rej_reason += "ID "+str(carnet.id)+": No Partner Address Defined on Partner \n" continue for prod_id in list: val = obj_lines.product_id_change(cr, uid, [], prod_id,uom =False, partner_id=carnet.partner_id.id) val['value'].update({'product_id' : prod_id }) val['value'].update({'quantity' : 1 }) value.append(val) for val in value: inv_id =pool_obj.get('account.invoice.line').create(cr, uid, { 'name': carnet.name, 'account_id':val['value']['account_id'], 'price_unit': val['value']['price_unit'], 'quantity': val['value']['quantity'], 'discount': False, 'uos_id': val['value']['uos_id'], 'product_id':val['value']['product_id'], 'invoice_line_tax_id': [(6,0,val['value']['invoice_line_tax_id'])], 'note':'', }) create_ids.append(inv_id) inv = { 'name': carnet.name, 'origin': carnet.name, 'type': 'out_invoice', 'reference': False, 'account_id': carnet.partner_id.property_account_receivable.id, 'partner_id': carnet.partner_id.id, 'address_invoice_id':address_invoice, 'address_contact_id':address_contact, 'invoice_line': [(6,0,create_ids)], 'currency_id' :carnet.partner_id.property_product_pricelist.currency_id.id,# 1, 'comment': '', 'payment_term':carnet.partner_id.property_payment_term.id, } inv_obj = pool_obj.get('account.invoice') inv_id = inv_obj.create(cr, uid, inv) list_inv.append(inv_id) wf_service = netsvc.LocalService('workflow') wf_service.trg_validate(uid, 'cci_missions.ata_carnet', carnet.id, 'created', cr) obj_carnet.write(cr, uid,carnet.id, {'invoice_id' : inv_id}) return {'inv_created' : str(inv_create),'inv_rejected' : str(inv_reject) ,'invoice_ids': list_inv , 'inv_rej_reason': inv_rej_reason} | dad841158a1040e6552fb25f0bcb98fe9c9fd228 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/dad841158a1040e6552fb25f0bcb98fe9c9fd228/create_invoice_carnet.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
3605,
17725,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
2845,
67,
2603,
273,
2845,
264,
18,
588,
67,
6011,
12,
3353,
18,
20979,
13,
1081,
67,
71,
1303,
278,
273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2640,
3605,
17725,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
2845,
67,
2603,
273,
2845,
264,
18,
588,
67,
6011,
12,
3353,
18,
20979,
13,
1081,
67,
71,
1303,
278,
273... |
self.check_sizeof(unittest, size(h + 'P')) self.check_sizeof(xrange(1), size(h + '3l')) | check(unittest, size(h + 'P')) check(None, size(h + '')) check(object(), size(h + '')) class C(object): def getx(self): return self.__x def setx(self, value): self.__x = value def delx(self): del self.__x x = property(getx, setx, delx, "") check(x, size(h + '4Pi')) check(iter(xrange(1)), size(h + '4l')) check(reversed(''), size(h + 'PP')) | def get_gen(): yield 1 | d2cd86ddd5c3d90911a98a1440563118297e45db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/d2cd86ddd5c3d90911a98a1440563118297e45db/test_sys.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
4507,
13332,
2824,
404,
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,
336,
67,
4507,
13332,
2824,
404,
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,
-1... |
raise ValueError, "linkname is too long (>%d)" \ % (LENGTH_LINK) | raise ValueError("linkname is too long (>%d)" % (LENGTH_LINK)) | def addfile(self, tarinfo, fileobj=None): """Add the TarInfo object `tarinfo' to the archive. If `fileobj' is given, tarinfo.size bytes are read from it and added to the archive. You can create TarInfo objects using gettarinfo(). On Windows platforms, `fileobj' should always be opened with mode 'rb' to avoid irritation about the file size. """ self._check("aw") | 9d576e732e0c14bd37ecb65d8001d6f596cc8566 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9d576e732e0c14bd37ecb65d8001d6f596cc8566/tarfile.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
768,
12,
2890,
16,
8232,
1376,
16,
17041,
33,
7036,
4672,
3536,
986,
326,
20334,
966,
733,
1375,
11718,
1376,
11,
358,
326,
5052,
18,
971,
1375,
768,
2603,
11,
353,
864,
16,
8232,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
768,
12,
2890,
16,
8232,
1376,
16,
17041,
33,
7036,
4672,
3536,
986,
326,
20334,
966,
733,
1375,
11718,
1376,
11,
358,
326,
5052,
18,
971,
1375,
768,
2603,
11,
353,
864,
16,
8232,... |
actor, pickPosition = findPickedProp(obj) | actor, pickPosition = findPickedProp(obj, True) | def findPickedProp(obj): (x,y) = obj.GetEventPosition() # we use a cell picker, because we don't want the point # to fall through the polygons, if you know what I mean picker = vtk.vtkCellPicker() picker.SetTolerance(0.005) print "%d %d" % (x,y) picker.Pick(x,y,0.0,self._threedRenderer) return (picker.GetActor(), picker.GetPickPosition()) | 64e0c66e88d6f7361ea850990639dcc4718efcea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/64e0c66e88d6f7361ea850990639dcc4718efcea/slice3dVWR.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
17968,
329,
4658,
12,
2603,
4672,
261,
92,
16,
93,
13,
273,
1081,
18,
967,
1133,
2555,
1435,
468,
732,
999,
279,
2484,
18141,
16,
2724,
732,
2727,
1404,
2545,
326,
1634,
468,
358... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
17968,
329,
4658,
12,
2603,
4672,
261,
92,
16,
93,
13,
273,
1081,
18,
967,
1133,
2555,
1435,
468,
732,
999,
279,
2484,
18141,
16,
2724,
732,
2727,
1404,
2545,
326,
1634,
468,
358... |
else: usage("Invalid setting for OPTIMIZE"); if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER); | else: usage("Invalid setting for OPTIMIZE") if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER) | def parseopts(args): global COMPILER,OPTIMIZE,OMIT,THIRDPARTY,INSTALLER,COPYEXTRAS,VERSION1,VERSION2,VERSION3,COMPRESSOR global DirectXSDK,VERBOSE longopts = [ "help","package-info","compiler=","directx-sdk=","thirdparty=", "optimize=","everything","nothing","installer","quiet","verbose", "complete","default","v1=","v2=","v3=","lzma"] anything = 0 for pkg in PACKAGES: longopts.append("no-"+pkg.lower()) for pkg in PACKAGES: longopts.append("use-"+pkg.lower()) try: opts, extras = getopt.getopt(args, "", longopts) for option,value in opts: if (option=="--help"): raise "usage" if (option=="--package-info"): raise "package-info" if (option=="--compiler"): COMPILER=value if (option=="--directx-sdk"): DirectXSDK=value if (option=="--thirdparty"): THIRDPARTY=value if (option=="--optimize"): OPTIMIZE=value if (option=="--quiet"): VERBOSE-=1 if (option=="--verbose"): VERBOSE+=1 if (option=="--installer"): INSTALLER=1 if (option=="--complete"): COMPLETE=1 if (option=="--everything"): OMIT=[] if (option=="--nothing"): OMIT=PACKAGES[:] if (option=="--v1"): VERSION1=int(value) if (option=="--v2"): VERSION2=int(value) if (option=="--v3"): VERSION3=int(value) if (option=="--lzma"): COMPRESSOR="lzma" for pkg in PACKAGES: if (option=="--use-"+pkg.lower()): if (OMIT.count(pkg)): OMIT.delete(pkg) for pkg in PACKAGES: if (option=="--no-"+pkg.lower()): if (OMIT.count(pkg)==0): OMIT.append(pkg) anything = 1 except "package-info": packageInfo() except: usage(0) if (anything==0): usage(0) if (OPTIMIZE=="1"): OPTIMIZE=1 elif (OPTIMIZE=="2"): OPTIMIZE=2 elif (OPTIMIZE=="3"): OPTIMIZE=3 elif (OPTIMIZE=="4"): OPTIMIZE=4 else: usage("Invalid setting for OPTIMIZE"); if (COMPILERS.count(COMPILER)==0): usage("Invalid setting for COMPILER: "+COMPILER); | 4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/4a71a3ad56d88a79d9aba6c9d9fa1abc8c3a885e/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4952,
12,
1968,
4672,
2552,
5423,
1102,
14668,
16,
15620,
3445,
15641,
16,
1872,
1285,
16,
2455,
7937,
40,
2778,
5538,
16,
28865,
654,
16,
24875,
22639,
55,
16,
5757,
21,
16,
5757,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
4952,
12,
1968,
4672,
2552,
5423,
1102,
14668,
16,
15620,
3445,
15641,
16,
1872,
1285,
16,
2455,
7937,
40,
2778,
5538,
16,
28865,
654,
16,
24875,
22639,
55,
16,
5757,
21,
16,
5757,... |
\s+\w+\s+\w+ \s+\d+ [^/]* | [^/]* | def test_getstatus(self): # This pattern should match 'ls -ld /.' on any posix # system, however perversely configured. pat = r'''d......... # It is a directory. \s+\d+ # It has some number of links. \s+\w+\s+\w+ # It has a user and group, which may # be named anything. \s+\d+ # It has a size. [^/]* # Skip the date. /\. # and end with the name of the file. ''' | 884554dfe54fe4015a1ca2c0624e247dce9312f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/884554dfe54fe4015a1ca2c0624e247dce9312f5/test_commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
588,
2327,
12,
2890,
4672,
468,
1220,
1936,
1410,
845,
296,
3251,
300,
1236,
342,
1093,
603,
1281,
16366,
468,
2619,
16,
14025,
1534,
2496,
2357,
4351,
18,
9670,
273,
436,
2641... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
588,
2327,
12,
2890,
4672,
468,
1220,
1936,
1410,
845,
296,
3251,
300,
1236,
342,
1093,
603,
1281,
16366,
468,
2619,
16,
14025,
1534,
2496,
2357,
4351,
18,
9670,
273,
436,
2641... |
mode = theano.compile.mode.get_default_mode().excluding("local_elemwise_fusion") | if theano.config.mode=='FAST_COMPILE': mode = theano.compile.mode.get_mode('FAST_RUN').excluding("local_elemwise_fusion") else: mode = theano.compile.mode.get_default_mode().excluding("local_elemwise_fusion") | def test_abs_mul_div(self): """ test that if we have 4 * x / abs(2*x) it get simplifier during canonicalisation. """ | f0fe6f5f6b838e706655b5833d42d6dd12285fbf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/f0fe6f5f6b838e706655b5833d42d6dd12285fbf/test_opt.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5113,
67,
16411,
67,
2892,
12,
2890,
4672,
3536,
1842,
716,
309,
732,
1240,
1059,
380,
619,
342,
2417,
12,
22,
14,
92,
13,
518,
336,
9330,
1251,
4982,
7378,
10742,
18,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
5113,
67,
16411,
67,
2892,
12,
2890,
4672,
3536,
1842,
716,
309,
732,
1240,
1059,
380,
619,
342,
2417,
12,
22,
14,
92,
13,
518,
336,
9330,
1251,
4982,
7378,
10742,
18,
3536,
... |
} prefixes = { | def removeSemicolon(result): if result.endswith(__semicolonSymbol): return result[:-len(__semicolonSymbol)] else: return result | 755336729025479a4bfd68188acd5ca861fbbe4e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/755336729025479a4bfd68188acd5ca861fbbe4e/Compressor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1206,
13185,
17280,
12,
2088,
4672,
309,
563,
18,
5839,
1918,
12,
972,
12000,
17280,
5335,
4672,
327,
563,
10531,
17,
1897,
12,
972,
12000,
17280,
5335,
25887,
469,
30,
327,
563,
282,
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,
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,
1206,
13185,
17280,
12,
2088,
4672,
309,
563,
18,
5839,
1918,
12,
972,
12000,
17280,
5335,
4672,
327,
563,
10531,
17,
1897,
12,
972,
12000,
17280,
5335,
25887,
469,
30,
327,
563,
282,
2,... | |
storageSize = pfnSize[pfn] catalogSize = lfnDict['Size'] if int(catalogSize) == int(storageSize): gLogger.info("SEvsLFCAgent.execute: Catalog and storage sizes match.","%s %s" % (pfn,storageElementName)) gLogger.info("Change the status in the LFC") elif int(storageSize) == 0: gLogger.error("SEvsLFCAgent.execute: Physical file size is 0.", "%s %s" % (pfn,storageElementName)) fileMetadata = {'Prognosis':'ZeroSizePfn','LFN':lfn,'PFN':pfn,'StorageElement':storageElementName} | registeredPfns = repDict.values() if not pfn in registeredPfns: gLogger.error("SEvsLFCAgent.execute: SE PFN not registered.","%s %s" % (lfn,pfn)) fileMetadata = {'Prognosis':'PfnNoReplica','LFN':lfn,'PFN':pfn,'StorageElement':storageElementName} | def execute(self): | 1b9d83d531f8db0d9d33db0e1e58e4f715d8c153 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/1b9d83d531f8db0d9d33db0e1e58e4f715d8c153/SEvsLFCAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
w.x = randrange(size) w.y = randrange(size) | w.i = randrange(size) w.j = randrange(size) | def randplace(size): "Choose a random location." w = coord() w.x = randrange(size) w.y = randrange(size) return w | e67cf36a789c4ab1cd905a9a08e91d219395f538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3176/e67cf36a789c4ab1cd905a9a08e91d219395f538/sst.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5605,
964,
12,
1467,
4672,
315,
24529,
279,
2744,
2117,
1199,
341,
273,
2745,
1435,
341,
18,
77,
273,
5605,
3676,
12,
1467,
13,
341,
18,
78,
273,
5605,
3676,
12,
1467,
13,
327,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5605,
964,
12,
1467,
4672,
315,
24529,
279,
2744,
2117,
1199,
341,
273,
2745,
1435,
341,
18,
77,
273,
5605,
3676,
12,
1467,
13,
341,
18,
78,
273,
5605,
3676,
12,
1467,
13,
327,
341,
... |
def warn(self, msg): self.logger.warning(msg) | def warn(self, msg, *args): self.logger.warning(msg, *args) | def warn(self, msg): self.logger.warning(msg) | 1970c59234994dbad4c75ce428da16c69f22df48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1970c59234994dbad4c75ce428da16c69f22df48/translate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1894,
12,
2890,
16,
1234,
4672,
365,
18,
4901,
18,
8551,
12,
3576,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
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,
1894,
12,
2890,
16,
1234,
4672,
365,
18,
4901,
18,
8551,
12,
3576,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
T("originalartist", _("originalartist")), | T("originalartist", _("original artist")), | def N_(name): return T(name, _(name)) | b1b79bae33170259b7db1fa9d653f799d38e1c72 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4764/b1b79bae33170259b7db1fa9d653f799d38e1c72/tags.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
423,
67,
12,
529,
4672,
327,
399,
12,
529,
16,
389,
12,
529,
3719,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
423,
67,
12,
529,
4672,
327,
399,
12,
529,
16,
389,
12,
529,
3719,
225,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.