rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
id=item.tpId() e=tpValuesIds(item) if e: id=[id,e] else: id=[id] r.append(id) | if item.tpValues(): id=item.tpId() e=tpValuesIds(item) if e: id=[id,e] else: id=[id] r.append(id) | def tpValuesIds(self): r=[] try: for item in self.tpValues(): try: id=item.tpId() e=tpValuesIds(item) if e: id=[id,e] else: id=[id] r.append(id) except: pass except: pass return r | 4857a055c29e4cac7d6439a101fadfcdd6017089 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/4857a055c29e4cac7d6439a101fadfcdd6017089/TreeTag.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8071,
1972,
2673,
12,
2890,
4672,
436,
33,
8526,
775,
30,
364,
761,
316,
365,
18,
6834,
1972,
13332,
775,
30,
309,
761,
18,
6834,
1972,
13332,
612,
33,
1726,
18,
6834,
548,
1435,
425,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8071,
1972,
2673,
12,
2890,
4672,
436,
33,
8526,
775,
30,
364,
761,
316,
365,
18,
6834,
1972,
13332,
775,
30,
309,
761,
18,
6834,
1972,
13332,
612,
33,
1726,
18,
6834,
548,
1435,
425,
... |
def plot_psth(spikes, bin_size=1, ax=None, tmax=None): | def plot_psth(spikes, bin_size=1, axis=None, tmax=None, **kwargs): | def plot_psth(spikes, bin_size=1, ax=None, tmax=None): """ Plots PSTH from spikes (list of arrays of spike timings) bin_size: bin size in ms ax: axis to draw on """ import matplotlib.pyplot as plt # Assert list of arrays as input #assert np.all([isinstance(each, np.ndarray) for each in spikes]) all_spikes = np.concatenate(tuple(spikes)) # Remove entries greater than tmax if tmax != None: all_spikes = np.delete(all_spikes, np.where(np.asarray(all_spikes) > tmax)[0]) if len(all_spikes) != 0: # bin size = 1ms nbins = np.floor((max(all_spikes) - min(all_spikes)) / float(bin_size)) if ax == None: #plt.hist(all_spikes, nbins) plt.hist(all_spikes, nbins) plt.show() else: #ax.hist(all_spikes, nbins) n, bins = np.histogram(all_spikes, nbins) ax.plot(bins[0:-1], n) | 31ed32771977947e198eefc598e4dd27b79255e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7039/31ed32771977947e198eefc598e4dd27b79255e5/thorns.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
67,
84,
20244,
12,
1752,
25235,
16,
4158,
67,
1467,
33,
21,
16,
2654,
33,
7036,
16,
28986,
33,
7036,
16,
2826,
4333,
4672,
3536,
3008,
6968,
453,
882,
44,
628,
1694,
25235,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3207,
67,
84,
20244,
12,
1752,
25235,
16,
4158,
67,
1467,
33,
21,
16,
2654,
33,
7036,
16,
28986,
33,
7036,
16,
2826,
4333,
4672,
3536,
3008,
6968,
453,
882,
44,
628,
1694,
25235,
261,
... |
skipNotByDefault = False, excludeList = [], | skipNotByDefault = True, excludeList = [], | def createChangeSet(self, csList, recurse = True, skipNotByDefault = False, excludeList = [], callback = None, withFiles = False, withFileContents = False): """ Like self.createChangeSetFile(), but returns a change set object. withFiles and withFileContents are the same as for the underlying repository call. """ (fullCsList, primaryList) = self._createChangeSetList(csList, recurse = recurse, skipNotByDefault = skipNotByDefault, excludeList = excludeList) | fe4d931dc3570785d04ff7a900fa2f89770abc5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/fe4d931dc3570785d04ff7a900fa2f89770abc5d/conaryclient.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
21565,
12,
2890,
16,
2873,
682,
16,
11502,
273,
1053,
16,
2488,
1248,
858,
1868,
273,
1053,
16,
4433,
682,
273,
5378,
16,
1348,
273,
599,
16,
598,
2697,
273,
1083,
16,
598,
812,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
21565,
12,
2890,
16,
2873,
682,
16,
11502,
273,
1053,
16,
2488,
1248,
858,
1868,
273,
1053,
16,
4433,
682,
273,
5378,
16,
1348,
273,
599,
16,
598,
2697,
273,
1083,
16,
598,
812,
... |
"For this Alpha release, deleted objects may be permanently lost, or they might be recoverable using Undo.</p>" | "For this Alpha release, deleted objects may be permanently "\ "lost, or they might be recoverable using Undo.</p>" | def createWhatsThisTextForMainWindowWidgets(win): """ Adds the "What's This" help text to items found in the NE1 mainwindow toolbars and menus . @param win: NE1's mainwindow object. @type win: U{B{QMainWindow}<http://doc.trolltech.com/4/qmainwindow.html>} @note: Property Managers specify "What's This" text for their own widgets, usually in a method called add_whats_this_text(), not in this file. """ # # File Toolbar # # Open File fileOpenText = "<u><b>Open File</b></u> (Ctrl + O)<br> "\ "<p><img source=\"ui/actions/File/Open.png\"><br> "\ "Opens a new file."\ "</p>" win.fileOpenAction.setWhatsThis( fileOpenText ) # Import File fileImportText = "<u><b>Import File</b></u><br>"\ "Inserts a file of any chemical file format supported by "\ "<b>Openbabel</b> into the current Part" win.fileImportAction.setWhatsThis(fileImportText) #Export File fileExportText = "<u><b>Export File</b></u><br>"\ "Save the current Part in any chemical file format supported by "\ "<b>Openbabel</b>. Note that exclusive features of NanoEngineer-1 "\ "are not saved to the exported file" win.fileExportAction.setWhatsThis(fileExportText) # Save File fileSaveText = "<u><b>Save File</b></u> (Ctrl + S)<br> "\ "<p><img source=\"ui/actions//Save.png\"><br> "\ "Saves the current file."\ "</p>" win.fileSaveAction.setWhatsThis( fileSaveText ) # # Edit Toolbar # # Make Checkpoint ### editMakeCheckpointText = \ "<u><b>Make Checkpoint</b></u>"\ "<p>"\ "<img source=\"ui/actions/Edit/Make_CheckPoint.png\"><br> "\ "Make Undo checkpoint."\ "</p>" win.editMakeCheckpointAction.setWhatsThis( editMakeCheckpointText ) # Automatic Checkpointing ### [minor changes, bruce 060319] editAutoCheckpointingText = \ "<u><b>Automatic Checkpointing</b></u>"\ "<p>"\ "Enables/Disables <b>Automatic Checkpointing</b>. When enabled, "\ "the program maintains the Undo stack automatically. When disabled, "\ "the user is required to manually create Undo checkpoints using the "\ "<b>Make Checkpoint</b> button: "\ "</p>"\ "<p><img source=\"ui/actions/Edit/Make_CheckPoint.png\">"\ "</p>"\ "<p><b>Automatic Checkpointing</b> can impact program performance. "\ "By disabling Automatic Checkpointing, the program will run faster. "\ "</p>"\ "<p><b><i>Remember that you must make your own Undo checkpoints "\ "manually when Automatic Checkpointing is disabled.</i></b>"\ "</p>" win.editAutoCheckpointingAction.setWhatsThis( editAutoCheckpointingText ) # Clear Undo Stack ### [minor changes, bruce 060319] editClearUndoStackText = "<u><b>Clear Undo Stack</b></u>"\ "<p>Clears all checkpoints on the Undo and Redo stacks, freeing up memory."\ "</p>" win.editClearUndoStackAction.setWhatsThis( editClearUndoStackText ) # Undo editUndoText = "<u><b>Undo</b></u> (Ctrl + Z)<br> "\ "<p><img source=\"ui/actions/Undo.png\"><br> "\ "Reverses the last edit or command which changed structure or selection. "\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Undo "\ "only works if you got this popup from the Edit menu item for Undo, "\ "not from the Undo toolbutton."\ "</font>"\ "</p>" #bruce 060317 revised this text to reflect what it does in A7; 060320 added 1421-not-fixed warning win.editUndoAction.setWhatsThis( editUndoText ) win.editUndoText = editUndoText #bruce 060317 to help fix bug 1421 in Undo whatsthis wiki help link # Redo from PlatformDependent import is_macintosh if is_macintosh(): redo_accel = "(Ctrl + Shift + Z)" # note: this is further modified (Ctrl -> Cmd) by other code # changing this is partly redundant with code in undo*.py, but as of 060317 it's desirable in editRedoText too else: redo_accel = "(Ctrl + Y)" editRedoText = "<u><b>Redo</b></u> %s<br> "\ "<p><img source=\"ui/actions/Edit/Redo.png\"> <br>"\ "Restores a change which was undone using the Undo command."\ "<br><font color=\"#808080\">"\ "Known bug: the link to wiki help for Redo "\ "only works if you got this popup from the Edit menu item for Redo, "\ "not from the Redo toolbutton."\ "</font>"\ "</p>" % redo_accel #bruce 060317 revised this text to be more accurate, and split out redo_accel; 060320 added 1421-not-fixed warning win.editRedoAction.setWhatsThis( editRedoText ) win.editRedoText = editRedoText #bruce 060317 to help fix bug 1421 in Redo whatsthis wiki help link # Cut editCutText = "<u><b>Cut</b></u> (Ctrl + X)<br> "\ "<p><img source=\"ui/actions/Edit/Cut.png\"><br> "\ "Removes the selected object(s) and stores the cut data on the"\ "clipboard."\ "</p>" win.editCutAction.setWhatsThis( editCutText ) # Copy editCopyText = "<u><b>Copy</b></u> (Ctrl + C)<br> "\ "<p><img source=\"ui/actions/Edit/Copy.png\"><br> "\ "Places a copy of the selected chunk(s) on the clipboard "\ "while leaving the original chunk(s) unaffected."\ "</p>" win.editCopyAction.setWhatsThis( editCopyText ) # Paste editPasteText = "<u><b>Paste</b></u> (Ctrl + V)<br> "\ "<p><img source=\"ui/actions/Edit/Paste_On.png\"><br> "\ "<b>Paste</b> places the user in <b>Build</b> mode where copied chunks on "\ "the clipboard can be pasted into the model by double clicking in empty space. "\ "If the current clipboard chunk has a <b><i>hotspot</i></b>, it can be bonded to "\ "another chunk by single clicking on one of the chunk's bondpoints."\ "</p>"\ "<p>A <b><i>Hotspot</i></b> is a green bondpoint on a clipboard chunk indicating "\ "it will be the active bondpoint which will connect to another chunk's bondpoint. "\ "To specify a hotspot on the clipboard chunk, click on one of its bondpoints in the "\ "<b><i>MMKit's Thumbview</i></b>."\ "</p>" win.editPasteAction.setWhatsThis( editPasteText ) # Delete editDeleteText = "<u><b>Delete</b></u> (DEL)<br> "\ "<p><img source=\"ui/actions/Delete.png\"><br> "\ "Deletes the selected object(s). "\ "For this Alpha release, deleted objects may be permanently lost, or they might be recoverable using Undo.</p>" #bruce 060212 revised above text (and fixed spelling error); should be revised again before A7 release win.editDeleteAction.setWhatsThis( editDeleteText ) #Preferences Dialog editPrefsText = "<u><b>Preferences Dialog</b></u>"\ "<p>Allows you to edit various user preferences "\ "such as changing atom, bond display properties,"\ "lighting, background color, window position and"\ "size, plugins etc. </p>" win.editPrefsAction.setWhatsThis( editPrefsText ) # # View Toolbar # # Home View setViewHomeActionText = \ "<u><b>Home</b></u> (Home)<br>"\ "<p>"\ "<img source=\"ui/actions/View/Modify/Home.png\"><br>"\ "When you create a new model, it appears in a "\ "default view orientation (FRONT view). When you "\ "open an existing model, it appears in the "\ "orientation it was last saved. You can change the "\ "default orientation by selecting <b>Set Home View "\ "to Current View</b> from the <b>View</b> menu."\ "</p>" win.setViewHomeAction.setWhatsThis( setViewHomeActionText ) # Fit to Window setViewFitToWindowActionText = "<u><b>Fit To Window</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom_To_Fit.png\"><br> "\ "Refits the model to the screen so you can view the entire model."\ "</p>" win.setViewFitToWindowAction.setWhatsThis( setViewFitToWindowActionText ) # Recenter setViewRecenterActionText = "<u><b>Recenter</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Recenter.png\"><br> "\ "Changes the view center and zoom factor so that the origin is in the "\ "center of the view and you can view the entire model."\ "</p>" win.setViewRecenterAction.setWhatsThis( setViewRecenterActionText ) # Zoom Tool setzoomToolActionText = "<u><b>Zoom Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Zoom.png\"><br> "\ "Allows the user to zoom into a specific area of the model by specifying a rectangular area. "\ "This is done by holding down the left button and dragging the mouse.</p>"\ "<p>A mouse with a mouse wheel can also be used to zoom in and out "\ "at any time, without using the Zoom Tool.</p>" win.zoomToolAction.setWhatsThis( setzoomToolActionText ) # Pan Tool setpanToolActionText = "<u><b>Pan Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Pan.png\"><br> "\ "Allows X-Y panning using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can pan the model at any time by pressing "\ "the middle mouse button while holding down the Shift key.</p>" win.panToolAction.setWhatsThis( setpanToolActionText ) # Rotate Tool setrotateToolActionText = "<u><b>Rotate Tool</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Rotate.png\"><br> "\ "Allows free rotation using the left mouse button.</p>"\ "<p>Users with a 3-button mouse can rotate the model at any time by pressing "\ "the middle mouse button and dragging the mouse.</p>" win.rotateToolAction.setWhatsThis( setrotateToolActionText ) # Orthographic Projection setViewOrthoActionText = "<u><b>Orthographic Projection</b></u><br>"\ "<p>Sets nonperspective (or parallel) projection, with no foreshortening."\ "</p>" win.setViewOrthoAction.setWhatsThis( setViewOrthoActionText ) # Perspective Projection setViewPerspecActionText = "<u><b>Perspective Projection</b></u><br>"\ "<p>Set perspective projection, drawing objects slightly larger "\ "that are closer to the viewer."\ "</p>" win.setViewPerspecAction.setWhatsThis( setViewPerspecActionText ) # Normal To viewNormalToActionText = "<u><b>Set View Normal To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Normal_To.png/\"><br> "\ "Orients view to the normal vector of the plane defined by "\ "3 or more selected atoms, or a jig's axis."\ "</p>" win.viewNormalToAction.setWhatsThis( viewNormalToActionText ) # Parallel To viewParallelToActionText = "<u><b>Set View Parallel To</b></u><br>"\ "<p><img source=\"ui/actions/View/Set_View_Parallel_To.png\"><br> "\ "Orients view parallel to the vector defined by 2 selected atoms."\ "</p>" win.viewParallelToAction.setWhatsThis( viewParallelToActionText ) # Save Named View saveNamedViewActionText = "<u><b>Save Named View</b></u><br>"\ "<p><img source=\"ui/actions/View/Modify/Save_Named_View.png\"><br> "\ "Saves the current view as a custom <b>named view</b> and places it in the Model Tree.</p>" \ "<p>The view can be restored by selecting <b>Change View</b> from its context menu in the Model Tree."\ "</p>" win.saveNamedViewAction.setWhatsThis( saveNamedViewActionText ) # Front View viewFrontActionText = "<u><b>Front View</b></u><br>"\ "<p><img source=\"ui/actions/View/Front.png\"><br> "\ "Orients the view to the Front View."\ "</p>" win.viewFrontAction.setWhatsThis( viewFrontActionText ) # Back View viewBackActionText = "<u><b>Back View</b></u><br>"\ "<p><img source=\"ui/actions/View/Back.png\"><br> "\ "Orients the view to the Back View."\ "</p>" win.viewBackAction.setWhatsThis( viewBackActionText ) # Top View viewTopActionText = "<u><b>Top View</b></u><br>"\ "<p><img source=\"ui/actions/View/Top.png\"><br> "\ "Orients the view to the Top View."\ "</p>" win.viewTopAction.setWhatsThis( viewTopActionText ) # Bottom View viewBottomActionText = "<u><b>Bottom View</b></u><br>"\ "<p><img source=\"ui/actions/View/Bottom.png\"><br> "\ "Orients the view to the Bottom View."\ "</p>" win.viewBottomAction.setWhatsThis( viewBottomActionText ) # Left View viewLeftActionText = "<u><b>Left View</b></u><br>"\ "<p><img source=\"ui/actions/View/Left.png\"><br> "\ "Orients the view to the Left View."\ "</p>" win.viewLeftAction.setWhatsThis( viewLeftActionText ) # Right View viewRightActionText = "<u><b>Right View</b></u><br>"\ "<p><img source=\"ui/actions/View/Right.png\"><br> "\ "Orients the view to the Right View."\ "</p>" win.viewRightAction.setWhatsThis( viewRightActionText ) #Isometric View viewIsometricActionText = "<u><b>IsometricView</b></u><br>"\ "<p><img source=\"ui/actions/View/Isometric.png\"><br> "\ "Orients the view to the Isometric View."\ "</p>" win.viewIsometricAction.setWhatsThis( viewIsometricActionText ) # Rotate View 180 viewRotate180ActionText = "<u><b>Rotate View 180</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_180.png.png\"><br> "\ "Rotates the view 180 degrees."\ "</p>" win.viewRotate180Action.setWhatsThis( viewRotate180ActionText ) # Rotate View +90 viewRotatePlus90ActionText = "<u><b>Rotate View +90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_+90.png\"><br> "\ "Increment the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotatePlus90Action.setWhatsThis( viewRotatePlus90ActionText ) # Rotate View -90 viewRotateMinus90ActionText = "<u><b>Rotate View -90</b></u><br>"\ "<p><img source=\"ui/actions/View/Rotate_View_-90.png\"><br> "\ "Decrement the current view by 90 degrees around the vertical axis."\ "</p>" win.viewRotateMinus90Action.setWhatsThis( viewRotateMinus90ActionText ) # QuteMol viewQuteMolActionText = \ "<u><b>QuteMol</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/QuteMol.png\"><br> "\ "Starts QuteMol and loads a PDB file of the current model."\ "</p>" \ "QuteMol must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewQuteMolAction.setWhatsThis( viewQuteMolActionText ) # POV-Ray (was Raytrace Scene) viewRaytraceSceneActionText = "<u><b>POV-Ray</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Raytrace_Scene.png\"><br> "\ "Raytrace the current scene using POV-Ray. "\ "</p>" \ "POV-Ray must be installed and enabled as a plug-in from "\ "<b>Preferences > Plug-ins</b> for this feature to work." \ "</p>" win.viewRaytraceSceneAction.setWhatsThis( viewRaytraceSceneActionText ) # # Grids Toolbar # # Surface 100 orient100ActionText = "<u><b>Surface 100</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface100.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,0,0) surface of a diamond lattice."\ "</p>" win.orient100Action.setWhatsThis(orient100ActionText ) # Surface 110 orient110ActionText = "<u><b>Surface 110</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface110.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,0) surface of a diamond lattice."\ "</p>" win.orient110Action.setWhatsThis(orient110ActionText ) # Surface 111 orient111ActionText = "<u><b>Surface 111</b></u><br>"\ "<p><img source=\"ui\actions\Properties Manager/Surface111.png\"><br> "\ "Reorients the view to the nearest angle that would "\ "look straight into a (1,1,1) surface of a diamond lattice."\ "</p>" win.orient111Action.setWhatsThis(orient111ActionText ) # # Insert toolbar # # Graphene insertGrapheneActionText = \ "<u><b>Build Graphene</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Graphene.png\"><br> "\ "Inserts a 2D sheet of graphene in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertGrapheneAction.setWhatsThis(insertGrapheneActionText ) # Build Nanotube insertNanotubeActionText = \ "<u><b>Build Nanotube</b></u>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Nanotube.png\"> <br>"\ "Inserts a carbon or boron nitride nanotube in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.insertNanotubeAction.setWhatsThis(insertNanotubeActionText ) # Build DNA buildDnaActionText = \ "<u><b>Build DNA</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/DNA.png\"><br> "\ "Inserts DNA in the model "\ "based on the current parameters in the Property Manager. "\ "To preview the structure based on the current parameters, "\ "click the Preview button located at the top of the "\ "Property Manager :<br> "\ "<img source=\"ui/actions/Properties Manager/Preview.png\"> "\ "</p>" win.buildDnaAction.setWhatsThis(buildDnaActionText ) # POV-Ray Scene insertPovraySceneActionText = "<u><b>Insert POV-Ray Scene</b></u><br>"\ "<p><img source=\"ui/actions/POV-Ray_Scene.png\"><br> "\ "Inserts a POV-Ray Scene file based on the current model and viewpoint. "\ "</p>" win.insertPovraySceneAction.setWhatsThis(insertPovraySceneActionText ) # Comment insertCommentActionText = "<u><b>Insert Comment</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Comment.png\"><br> "\ "Inserts a comment in the current part. "\ "</p>" win.insertCommentAction.setWhatsThis(insertCommentActionText ) # # Display toolbar # # Display Default dispDefaultActionText = "<u><b>Display Default</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Default.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Default</b> , rendering them in the <b>Current Display Mode</b>."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to the <b>Default Display Mode</b>. " \ "All chunks with their display setting set to <b>Default</b> will be rendered in the "\ "<b>Default Display Mode</b>."\ "</p>"\ "<p>The <b>Default Display Mode</b> can be changed via the "\ "<b>Edit > Preferences</b> menu and selecting the <b>Modes</b> tab."\ "</p>"\ "<p>The <b>Current or Default Display Mode</b> is displayed in the status bar in the "\ "lower right corner of the main window."\ "</p>" win.dispDefaultAction.setWhatsThis(dispDefaultActionText ) # Display Invisible dispInvisActionText = "<u><b>Display Invisible</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Invisible.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Invisible</b>, making them invisible."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Invisible</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispInvisAction.setWhatsThis(dispInvisActionText ) # Display Lines dispLinesActionText = "<u><b>Display Lines</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Lines.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ " <b>Lines</b>. Only bonds are rendered as colored lines."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Lines</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispLinesAction.setWhatsThis(dispLinesActionText ) # Display Tubes dispTubesActionText = "<u><b>Display Tubes</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Tubes.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Tubes</b>. Atoms and bonds are rendered as colored tubes."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Tubes</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispTubesAction.setWhatsThis(dispTubesActionText ) # Display Ball and Stick dispBallActionText = "<u><b>Display Ball and Stick</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Ball_and_Stick.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>Ball and Stick</b> mode. Atoms are rendered "\ "as spheres and bonds are rendered as narrow cylinders."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Ball and Stick</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres and cylinders can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispBallAction.setWhatsThis(dispBallActionText ) # Display CPK # [bruce extended and slightly corrected text, 060307] dispCPKActionText = "<u><b>Display CPK</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/CPK.png\"><br> "\ "Changes the <i>display setting</i> of selected atoms or chunks to "\ "<b>CPK</b> mode. Atoms are rendered as spheres with "\ "a size equal to 0.78 of their VdW radius, corresponding "\ "to a contact force of approximately 0.1 nN with neighboring "\ "nonbonded atoms. Bonds are not rendered."\ "</p>"\ "<p>If no atoms or chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>CPK</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>"\ "<p>The scale of the spheres can be changed from the "\ "<b>Atoms</b> and <b>Bonds</b> pages of the <b>Preferences</b> dialog."\ "</p>" win.dispCPKAction.setWhatsThis(dispCPKActionText ) # Display Cylinder dispCylinderActionText = "<u><b>Display Cylinder</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Cylinder.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Cylinder</b> mode. Chunks are rendered as cylinders."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Cylinder</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispCylinderAction.setWhatsThis(dispCylinderActionText ) # Display Surface dispSurfaceActionText = "<u><b>Display Surface</b></u><br>"\ "<p><img source=\"ui/actions/View/Display/Surface.png\"><br> "\ "Changes the <i>display setting</i> of selected chunks to "\ "<b>Surface</b> mode. Chunks are rendered as a smooth surface."\ "</p>"\ "<p>If no chunks are selected, then this action will change the "\ "<b>Current Display Mode</b> of the 3D workspace to <b>Surface</b>. " \ "All chunks with their display setting set to <b>Default</b> will inherit "\ "this display property."\ "</p>" win.dispSurfaceAction.setWhatsThis(dispSurfaceActionText ) #Reset Chunk Color dispResetChunkColorText = "<u><b>Reset Chunk Color</b></u><br>"\ "Resets the user defined chunk color and renders the atoms " \ "(in the chunk) with their own element colors" win.dispResetChunkColorAction.setWhatsThis(dispResetChunkColorText ) #Reset Atoms Display dispResetAtomsDisplayText = "<u><b>Reset Atoms Display</b></u><br>"\ "Renders the selected atoms (or the atoms in the"\ "selected chunks) with the same display style as "\ "that of their parent chunk" win.dispResetAtomsDisplayAction.setWhatsThis(dispResetAtomsDisplayText) #Show Invisible Atoms dispShowInvisAtomsText = "<u><b>Show Invisible Atoms</b></u><br>"\ "Renders the selected atoms (or the atoms in the selected "\ "chunks) with the same display style as their parent chunk. "\ "However, if the parent chunk is set as invisible, this feature " \ "will not work. " win.dispShowInvisAtomsAction.setWhatsThis(dispShowInvisAtomsText) #Element Color Settings Dialog dispElementColorSettingsText = "<u><b>Element Color Settings Dialog</b></u><br>"\ "Element colors can be manually changed " \ "using this dialog. Also, the user can load"\ "or save the element colors" win.dispElementColorSettingsAction.setWhatsThis(dispElementColorSettingsText) # # Select toolbar # # Select All selectAllActionText = "<u><b>Select All</b></u> (Ctrl + A)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_All.png\"><br> "\ "When in <b>Build</b> mode, this will select all the atoms in "\ "the model. Otherwise, this will select all the chunks in the model."\ "</p>" win.selectAllAction.setWhatsThis(selectAllActionText ) # Select None selectNoneActionText = "<u><b>Select None</b></u></p><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_None.png\"><br> "\ "Unselects everything currently selected.</p>" win.selectNoneAction.setWhatsThis(selectNoneActionText ) # InvertSelection selectInvertActionText = "<u><b>Invert Selection</b></u> (Ctrl + Shift + I)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Invert.png\"><br> "\ "Inverts the current selection.</p>" win.selectInvertAction.setWhatsThis(selectInvertActionText ) # Select Connected selectConnectedActionText = "<u><b>Select Connected</b></u> (Ctrl + Shift + C)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Connected.png\"><br> "\ "Selects all the atoms that can be reached by the currently selected atom "\ "via an unbroken chain of bonds. </p>"\ "<p>You can also select all connected atoms by double clicking on an atom or bond "\ "while in <b>Build</b> mode.</p>" win.selectConnectedAction.setWhatsThis(selectConnectedActionText ) # Select Doubly selectDoublyActionText = "<u><b>Select Doubly</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Select/Select_Doubly.png\"><br> "\ "Selects all the atoms that can be reached from a currently selected "\ "atom through two disjoint unbroken chains of bonds. Atoms singly "\ "connected to this group and unconnected to anything else are also "\ "included in the selection."\ "</p>" win.selectDoublyAction.setWhatsThis(selectDoublyActionText ) # Expand Selection selectExpandActionText = "<u><b>Expand Selection</b></u> (Ctrl + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Expand.png\"><br> "\ "Selects any atom that is a neighbor of a currently selected atom."\ "</p>" win.selectExpandAction.setWhatsThis(selectExpandActionText ) # Contract Selection selectContractActionText = "<u><b>Contract Selection</b></u> (Ctrl + Shift + D)<br>"\ "<p><img source=\"ui/actions/Tools/Select/Contract.png\"><br> "\ "Deselects any atom that is a neighbor of a non-picked atom or has a bondpoint."\ "</p>" win.selectContractAction.setWhatsThis(selectContractActionText ) # # Modify Toolbar # # Adjust Selection modifyAdjustSelActionText = "<u><b>Adjust Selection</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_Selection.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the selection</i>) to make the geometry more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustSelAction.setWhatsThis(modifyAdjustSelActionText ) # Adjust All modifyAdjustAllActionText = "<u><b>Adjust All</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Adjust_All.png\"><br> "\ "Adjusts the atom and bond positions (<i>of the entire part</i>) to make the geometry of the part more realistic. "\ "The operations used to move the atoms and bonds approximate molecular mechanics methods."\ "</p>" win.modifyAdjustAllAction.setWhatsThis(modifyAdjustAllActionText ) # Hydrogenate modifyHydrogenateActionText = "<u><b>Hydrogenate</b></u> <br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Hydrogenate.png\"><br> "\ "Adds hydrogen atoms to all the bondpoints in the selection.</p>" win.modifyHydrogenateAction.setWhatsThis(modifyHydrogenateActionText ) # Dehydrogenate modifyDehydrogenateActionText = "<u><b>Dehydrogenate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Dehydrogenate.png\"><br> "\ "Removes all hydrogen atoms from the selection.</p>" win.modifyDehydrogenateAction.setWhatsThis(modifyDehydrogenateActionText ) # Passivate modifyPassivateActionText = "<u><b>Passivate</b></u> (Ctrl + P)<br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Passivate.png\"><br> "\ "Changes the types of incompletely bonded atoms to atoms with the "\ "right number of bonds, using atoms with the best atomic radius."\ "</p>" win.modifyPassivateAction.setWhatsThis(modifyPassivateActionText ) # Stretch modifyStretchActionText = "<u><b>Stretch</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Stretch.png\"><br> "\ "Stretches the bonds of the selected chunk(s).</p>" win.modifyStretchAction.setWhatsThis(modifyStretchActionText ) # Delete Bonds modifyDeleteBondsActionText = "<u><b>Cut Bonds</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Delete_Bonds.png\"><br> "\ "Delete all bonds between selected and unselected atoms or chunks.</p>" win.modifyDeleteBondsAction.setWhatsThis(modifyDeleteBondsActionText ) # Separate/New Chunk modifySeparateActionText = "<u><b>Separate</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Separate.png\"><br> "\ "Creates a new chunk(s) from the currently selected atoms. "\ "If the selected atoms belong to different chunks, multiple new "\ "chunks are created.</p>" win.modifySeparateAction.setWhatsThis(modifySeparateActionText ) # New Chunk makeChunkFromSelectedAtomsActionText = "<u><b>New Chunk</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/New_Chunk.png\"><br> "\ "Creates a new chunk from the currently selected atoms. "\ "All atoms end up in a single chunk.</p>" win.makeChunkFromSelectedAtomsAction.setWhatsThis(makeChunkFromSelectedAtomsActionText ) # Merge Chunks modifyMergeActionText = "<u><b>Merge Chunks</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Merge.png\"><br> "\ "Merges two or more chunks into a single chunk.</p>" win.modifyMergeAction.setWhatsThis(modifyMergeActionText ) # Invert Chunks modifyInvertActionText = "<u><b>Invert</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Invert.png\"><br> "\ "Inverts the atoms of the selected chunks.</p>" win.modifyInvertAction.setWhatsThis(modifyInvertActionText ) # Mirror Selected Chunks #Note that the the feature name is intentionally kept "Mirror" instead of "Mirror Chunks" because # in future we will support mirrroing atoms as well. -- ninad060814 modifyMirrorActionText = "<u><b>Mirror</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Mirror.png\"><br> "\ "Mirrors the selected <b> chunks </b> about a reference Grid Plane.<br>"\ "<font color=\"#808080\">Note: In this version, it doesn't mirror jigs or individual atoms.</font> </p>" win.modifyMirrorAction.setWhatsThis(modifyMirrorActionText ) # Align to Common Axis modifyAlignCommonAxisActionText = "<u><b>Align To Common Axis</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/AlignToCommonAxis.png\"><br> "\ "Aligns one or more chunks to the axis of the first selected chunk."\ "You must select two or more chunks before using this feature."\ "</p>" win. modifyAlignCommonAxisAction.setWhatsThis( modifyAlignCommonAxisActionText ) #Center on Common Axis modifyCenterCommonAxisActionText= "<u><b>Center On Common Axis</b></u><br>"\ "<p><b> Moves</b> all selected chunks to the center of the <b> first </b> selected chunk "\ "and also <b>aligns</b> them to the axis of the first one ."\ "You must select two or more chunks before using this feature. </p>" win.modifyCenterCommonAxisAction.setWhatsThis(modifyCenterCommonAxisActionText) # # Tools Toolbar # # Select Chunks toolsSelectMoleculesActionText = "<u><b>Select Chunks</b></u><!-- [[Feature:Select Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/63.png\"><br> "\ "<b>Select Chunks</b> allows you to select/unselect chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Click/Drag</b> - selects a chunk(s).</p>"\ "<p><b>Ctrl+Left Click/Drag</b> - removes chunk(s) from selection.</p>"\ "<p><b>Shift+Left Click/Drag</b> - adds chunk(s) to selection."\ "</p>" win. toolsSelectMoleculesAction.setWhatsThis( toolsSelectMoleculesActionText ) # Move Chunks toolsMoveMoleculeActionText = "<u><b>Move Chunks</b></u><!-- [[Feature:Move Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Toolbars/Standard/64.png\"><br> "\ "Activates <b>Move Chunks</b> mode, allowing you to select, "\ "move and rotate one of more chunks with the mouse.</p>"\ "<p><b><u>Mouse/Key Combinations</u></b></p>"\ "<p><b>Left Drag</b> - moves the selected chunk(s).</p>"\ "<p><b>Ctrl+Left Drag</b> - freely rotates selected chunk(s).</p>"\ "<p><b>Shift+Left Drag</b> - constrained movement and rotation of a chunk about its own axis."\ "</p>" win. toolsMoveMoleculeAction.setWhatsThis( toolsMoveMoleculeActionText ) # Build Atoms toolsDepositAtomActionText = \ "<u><b>Build Atoms</b></u><!-- [[Feature:Build Atoms]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Structures/Atoms.png\"><br> "\ "<b>Build Atoms</b> allows you to build structures one atom at a time or by depositing objects "\ "that are on the paste clipboard. You can also insert structures from the "\ "NanoEngineer-1 Parts Library.</p>"\ "<p>It is also possible to change bond types between atoms using the <b>Bond Tool</b> or by "\ "simply dragging and dropping one bondpoint onto another."\ "</p>" win. toolsDepositAtomAction.setWhatsThis( toolsDepositAtomActionText ) # Build Crystal (was Cookie Cutter Mode) toolsCookieCutActionText = "<u><b>Build Crystal</b></u><!-- [[Feature:Build Crystal]] --><br>"\ "<p><><img source=\"ui/actions/Tools/Build Structures/Cookie_Cutter.png\"><br> "\ "<b>Build Crystal</b> provides tools for cutting out multi-layered shapes from "\ "slabs of diamond or lonsdaleite lattice.</p>" win. toolsCookieCutAction.setWhatsThis( toolsCookieCutActionText ) # Tools > Extrude toolsExtrudeActionText = "<u><b>Extrude</b></u><!-- [[Feature:Extrude Mode]] --><br>"\ "<p><img source=\"ui/actions/Insert/Features/Extrude.png\"><br> "\ "Activates <b>Extrude</b> mode, allowing you to create a rod or ring using a chunk as "\ "a repeating unit.</p>" win. toolsExtrudeAction.setWhatsThis( toolsExtrudeActionText ) # Fuse Chunks Mode toolsFuseChunksActionText = "<u><b>Fuse Chunks Mode</b></u><!-- [[Feature:Fuse Chunks Mode]] --><br>"\ "<p><img source=\"ui/actions/Tools/Build Tools/Fuse.png\"><br> "\ "<b>Fuse Chunks</b> can be used to interactively join two or more "\ "chunks by dragging chunks around and fusing them together. "\ "Two fusing options are supported:<br><br>"\ "<b>Make Bonds</b> creates bonds between the existing bondpoints "\ "of two or more chunks. Bondpoints are highlighted and lines are drawn (and undrawn) as chunks "\ "are dragged to indicate bonding relationships between bondpoints. Bondpoints with "\ "multiple bonding relationships are highlighted in magenta to indicate that they cannot "\ "make bonds.<br><br>"\ "<b>Fuse Atoms</b> fuses pairs of overlapping atoms between chunks. The set of overlapping "\ "atoms in the selected chunk(s) are highlighted in green while the set of atoms that will be deleted "\ "in non-selected chunks are highlighted in dark red. It is possible that deleted atoms will not fuse "\ "properly, leaving bondpoints on the selected chunk(s) atoms. This is a bug. To help "\ "minimize this problem, try to get the bonds of overlapping atoms oriented similarly.<br>"\ "</p>" win.toolsFuseChunksAction.setWhatsThis( toolsFuseChunksActionText ) # # Simulator Toolbar # # Minimize Energy simMinimizeEnergyActionText = "<u><b>Minimize Energy</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Minimize_Energy.png\"><br> "\ "The potential energy of a chemical structure is a function of the relative positions of its atoms. " \ "To obtain this energy with complete accuracy involves a lot of computer time spent on quantum " \ "mechanical calculations, which cannot be practically done on a desktop computer. "\ "To get an approximate potential energy without all that, we represent the energy as a series of " \ "terms involving geometric properties of the structure: lengths of chemical bonds, angles between " \ "pairs and triples of chemical bonds, etc. </p>" \ "<p>" \ "As is generally the case with physical systems, the gradient of the potential energy represents " \ "the forces acting on various particles. The atoms want to move in the direction that most reduces " \ "the potential energy. Energy minimization is a process of adjusting the atom positions to try to find " \ "a global minimum of the potential energy. Each atom contributes three variables (its x, y, and z " \ "coordinates) so the search space is multi-dimensional. The global minimum is the configuration " \ "that the atoms will settle into if lowered to zero Kelvin. </p>" win. simMinimizeEnergyAction.setWhatsThis( simMinimizeEnergyActionText ) # Run Dynamics (was NanoDynamics-1). Mark 060807. simSetupActionText = "<u><b>Run Dynamics</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Run_Dynamics.png\"><br> "\ "This is the interface to the NanoEngineer-1 molecular dynamics simulator. "\ "Enter the parameters of the simulation and click <b>Run Simulation</b>."\ "The simulator creates a trajectory (movie) file by calculating the inter-atomic potentials and bonding "\ "of the entire model.</p>" win. simSetupAction.setWhatsThis( simSetupActionText ) # Play Movie (was Movie Player) Mark 060807. simMoviePlayerActionText = "<u><b>Play Movie</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Play_Movie.png\"><br> "\ "Plays the most recent trajectory (movie) file created by the NanoEngineer-1 molecular dynamics simulator."\ "To create a movie file, select <b>Run Dynamics</b>.</p>" win. simMoviePlayerAction.setWhatsThis( simMoviePlayerActionText ) # Make Graphs (was Plot Tool) Mark 060807. simPlotToolActionText = "<u><b>Make Graphs</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Make_Graphs.png\"><br> "\ "Make a graph of a simulator trace file using GNUplot. A simulation must be run to create "\ "the trace file and the part must have a jig that writes output to the trace file. <br><br>"\ "The following list of jigs write data to the trace file:<br>"\ "<b>Rotary Motors:</b> speed (GHz) and torque (nn-nm)<br>"\ "<b>Linear Motors:</b> displacement (pm)<br>"\ "<b>Anchors:</b> torque (nn-nm)<br>"\ "<b>Thermostats:</b> energy added (zJ)<br>"\ "<b>Thermometer:</b> temperature (K)<br>"\ "<b>Measure Distance:</b> distance(angstroms)<br>"\ "<b>Measure Angle:</b> angle (degrees)<br>"\ "<b>Measure Dihedral:</b> dihedral(degrees)<br>"\ "</p>" win. simPlotToolAction.setWhatsThis( simPlotToolActionText ) # # Dashboard Buttons # # Done toolsDoneActionText = "<u><b>Done</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Done.png\"><br> "\ "Completes the current operation and enters the default mode."\ "</p>" win. toolsDoneAction.setWhatsThis( toolsDoneActionText ) # Cancel toolsCancelActionText = "<u><b>Cancel</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/Cancel.png\"><br> "\ "Cancels the current operation and enters the default mode."\ "</p>" win. toolsCancelAction.setWhatsThis( toolsCancelActionText ) # Back up toolsBackUpActionText = "<u><b>Back Up</b></u><br>"\ "Undoes the previous operation."\ "</p>" win. toolsBackUpAction.setWhatsThis( toolsBackUpActionText ) # Start Over toolsStartOverActionText = "<u><b>Start Over</b></u><br>"\ "Cancels the current operation, leaving the user in the current mode."\ "</p>" win.toolsStartOverAction.setWhatsThis(toolsStartOverActionText ) # Add Layers ccAddLayerActionText = "<u><b>Add Layer</b></u><br>"\ "<p><img source=\"ui/actions/Properties Manager/addlayer.png\"><br> "\ "Adds a new layer of diamond lattice to the existing layer."\ "</p>" win.ccAddLayerAction.setWhatsThis(ccAddLayerActionText ) # # Jigs # # Anchor jigsAnchorActionText = "<u><b>Anchor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Anchor.png\"><br> "\ "Attaches an <b>Anchor</b> to the selected atom(s), which "\ "constrains its motion during a minimization or simulation."\ "</p>"\ "<p>To create an Anchor, enter <b>Build</b> mode, "\ "select the atom(s) you want to anchor and then select this action. "\ "Anchors are drawn as a black wireframe box around each selected atom."\ "</p>" win.jigsAnchorAction.setWhatsThis(jigsAnchorActionText ) # Rotary Motor jigsMotorActionText = "<u><b>Rotary Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Rotary_Motor.png\"><br> "\ "Attaches a <b>Rotary Motor</b> to the selected atoms. The Rotary Motor is used by "\ "the simulator to apply rotary motion to a set of atoms during a simulation run. You may "\ "specify the <b>torque (in nN*nm)</b> and <b>speed (in Ghz)</b> of the motor."\ "</p>"\ "<p>To create a Rotary Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsMotorAction.setWhatsThis(jigsMotorActionText ) # Linear Motor jigsLinearMotorActionText = "<u><b>Linear Motor</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Linear_Motor.png\"><br> "\ "Attaches a <b>Linear Motor</b> to the selected atoms. The Linear Motor is used by "\ "the simulator to apply linear motion to a set of atoms during a simulation run. You may "\ "specify the <b>force (in nN*nm)</b> and <b>stiffness (in N/m)</b> of the motor."\ "</p>"\ "<p>To create a Linear Motor, enter <b>Build</b> mode, "\ "select the atoms you want to attach the motor to and then select this action."\ "</p>" win.jigsLinearMotorAction.setWhatsThis(jigsLinearMotorActionText ) # Thermostat jigsStatActionText = "<u><b>Thermostat</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Thermostat.png\"><br> "\ "Attaches a <b>Langevin Thermostat</b> to a single selected atom, thereby associating "\ "the themostat to the entire molecule of which the selected atom is a member. The user "\ "specifies the temperature (in Kelvin)."\ "</p>"\ "<p>The Langevin Thermostat is used to set and hold the temperature "\ "of a molecule during a simulation run."\ "</p>"\ "<p>To create a Langevin Thermostat, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermostat is drawn as a "\ "blue wireframe box around the selected atom."\ "</p>" win.jigsStatAction.setWhatsThis(jigsStatActionText ) # Thermometer jigsThermoActionText = "<u><b>Thermometer</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Thermometer.png\"><br> "\ "Attaches a <b>Thermometer</b> to a single selected atom, thereby associating "\ "the themometer to the entire molecule of which the selected atom is a member. "\ "<p>The temperature of the molecule will be recorded and written to a trace file "\ "during a simulation run."\ "</p>"\ "<p>To create a Thermometer, enter <b>Build</b> mode, "\ "select a single atom and then select this action. The thermometer is drawn as a "\ "dark red wireframe box around the selected atom."\ "</p>" win.jigsThermoAction.setWhatsThis(jigsThermoActionText ) # ESP Image jigsESPImageActionText = "<u><b>ESP Image</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/ESP_Image.png\"><br> "\ "An <b>ESP Image</b> allows the user to visualize the electrostatic potential "\ "of points on the face of a square 2D surface. Nano-Hive's MPQC ESP Plane plug-in "\ "is used to calculate the electrostatic potential."\ "</p>"\ "<p>To create an ESP Image, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. The ESP Image is drawn as a "\ "plane with a bounding volume."\ "</p>" win.jigsESPImageAction.setWhatsThis(jigsESPImageActionText ) # Atom Set jigsAtomSetActionText = "<u><b>Atom Set</b></u><br>"\ "<p><img source=\"ui/actions/Tools/Atom_Set.png\"><br> "\ "An <b>Atom Set</b> jig provides a convienient way to save an atom "\ "selection which can be reselected later."\ "</p>"\ "<p>To create an Atom Set, enter <b>Build</b> mode, "\ "select any number of atoms and then select this jig. The Atom Set is "\ "drawn as a set of wireframe boxes around each atom in the selection."\ "</p>"\ "<p>To reselect the atoms in an Atom Set, select it's context "\ "menu in the Model Tree and click the menu item that states "\ "<b>Select this jig's atoms</b>."\ "</p>" win.jigsAtomSetAction.setWhatsThis(jigsAtomSetActionText ) # Measure Distance jigsDistanceActionText = "<u><b>Measure Distance Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Distance.png\"><br> "\ "A <b>Measure Distance Jig</b> functions as a dimension to display the "\ "distance between two atoms."\ "</p>"\ "<p>To create the Measure Distance Jig, enter <b>Build</b> mode, "\ "select two atoms and then select this jig. The Measure Distance Jig is "\ "drawn as a pair of wireframe boxes around each atom connected by "\ "a line and a pair of numbers. The first number is the distance between the "\ "VdW radii (this can be a negative number for atoms that are close together). "\ "The second number is the distance between the nuclei."\ "</p>"\ "<p>The Measure Distance Jig will write the two distance values to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDistanceAction.setWhatsThis(jigsDistanceActionText ) # Measure Angle jigsAngleActionText = "<u><b>Measure Angle Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Angle.png\"><br> "\ "A <b>Measure Angle Jig</b> functions as a dimension to display the "\ "angle between three atoms.</p>"\ "<p>To create the Measure Angle Jig, enter <b>Build</b> mode, "\ "select three atoms and then select this jig. The Measure Angle Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the angle between the three atoms."\ "</p>"\ "<p>The Measure Angle Jig will write the angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsAngleAction.setWhatsThis(jigsAngleActionText ) # Measure Dihedral jigsDihedralActionText = "<u><b>Measure Dihedral Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Measurements/Measure_Dihedral.png\"><br> "\ "A <b>Measure Dihedral Jig</b> functions as a dimension to display the "\ "dihedral angle of a four atom sequence.</p>"\ "<p>To create the Measure Dihedral Jig, enter <b>Build</b> mode, "\ "select four atoms and then select this jig. The Measure Dihedral Jig is "\ "drawn as a set of wireframe boxes around each atom and a number "\ "which is the dihedral angle value."\ "</p>"\ "<p>The Measure Dihedral Jig will write the dihedral angle value to the trace file "\ "for each frame of a simulation run and can be plotted using the Plot Tool."\ "</p>" win.jigsDihedralAction.setWhatsThis(jigsDihedralActionText ) # GAMESS Jig jigsGamessActionText = "<u><b>GAMESS Jig</b></u><br>"\ "<p><img source=\"ui/actions/Simulation/Gamess.png\"><br> "\ "A <b>GAMESS Jig</b> is used to tag a set of atoms for running a GAMESS "\ "calculation. <b>Energy</b> and <b>Geometry Optimization</b> calculations are supported."\ "</p>"\ "<p>To create the GAMESS Jig, enter <b>Build</b> mode, "\ "select the atoms to tag and then select this jig. The GAMESS Jig is drawn as a "\ "set of magenta wireframe boxes around each atom."\ "</p>" win.jigsGamessAction.setWhatsThis(jigsGamessActionText ) # Grid Plane Jig jigsGridPlaneActionText = "<u><b>Grid Plane</b></u><br>"\ "<p><img source=\"ui/actions/Insert/Reference Geometry/Grid_Plane.png\"><br> "\ "A <b>Grid Plane</b> jig is a rectanglar plane that can display a square or SiC grid "\ "within its boundary. It is often used as an aid in constructing large lattice "\ "structures made of silicon carbide (SiC). It is also used as a visual aid in estimating "\ "distances between atoms and/or other structures."\ "</p>"\ "<p>To create the Grid Plane jig, enter <b>Build</b> mode, "\ "select three or more atoms and then select this jig. "\ "</p>"\ "<p>The Grid Plane jig is drawn as a rectanglar plane with a grid."\ "</p>" win.jigsGridPlaneAction.setWhatsThis(jigsGridPlaneActionText ) # # Help Toolbar # # What's This helpWhatsThisText = "<u><b>What's This</b></u><br>"\ "<p><img source=\"ui/actions/Help/WhatsThis.png\"><br> "\ "Click this option to invoke a small question mark that is attached to the mouse pointer. "\ "Click on a feature which you would like more information about. "\ "A popup box appears with information about the feature.</p>" win.helpWhatsThisAction.setWhatsThis( helpWhatsThisText ) win.helpMouseControlsAction.setWhatsThis('Displays help for mouse controls') win.helpKeyboardShortcutsAction.setWhatsThis('Displays help for keyboard shortcuts') | 596540c24ceb3b478e904a42e26d7d5dd8809d95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/596540c24ceb3b478e904a42e26d7d5dd8809d95/whatsthis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
2888,
2323,
2503,
1528,
1290,
6376,
3829,
16166,
12,
8082,
4672,
3536,
15605,
326,
315,
23801,
1807,
1220,
6,
2809,
977,
358,
1516,
1392,
316,
326,
12901,
21,
2774,
5668,
12748,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
2888,
2323,
2503,
1528,
1290,
6376,
3829,
16166,
12,
8082,
4672,
3536,
15605,
326,
315,
23801,
1807,
1220,
6,
2809,
977,
358,
1516,
1392,
316,
326,
12901,
21,
2774,
5668,
12748,
87,
... |
if side == 0: self.texts.append(OWCanvasText(self.canvas, str(val), x0+currPos+width*0.5*perc, y1 + self.attributeValueOffset, Qt.AlignCenter, bold = 0)) elif side == 1: self.texts.append(OWCanvasText(self.canvas, str(val), x0-self.attributeValueOffset, y0+currPos+height*0.5*perc, Qt.AlignRight + Qt.AlignVCenter, bold = 0)) elif side == 2: self.texts.append(OWCanvasText(self.canvas, str(val), x0+currPos+width*perc*0.5, y0 - self.attributeValueOffset, Qt.AlignCenter, bold = 0)) else: self.texts.append(OWCanvasText(self.canvas, str(val), x1+self.attributeValueOffset, y0 + currPos + height*0.5*perc, Qt.AlignLeft + Qt.AlignVCenter, bold = 0)) | if side == 0: OWCanvasText(self.canvas, str(val), x0+currPos+width*0.5*perc, y1 + self.attributeValueOffset, Qt.AlignCenter, bold = 0) elif side == 1: OWCanvasText(self.canvas, str(val), x0-self.attributeValueOffset, y0+currPos+height*0.5*perc, Qt.AlignRight + Qt.AlignVCenter, bold = 0) elif side == 2: OWCanvasText(self.canvas, str(val), x0+currPos+width*perc*0.5, y0 - self.attributeValueOffset, Qt.AlignCenter, bold = 0) else: OWCanvasText(self.canvas, str(val), x1+self.attributeValueOffset, y0 + currPos + height*0.5*perc, Qt.AlignLeft + Qt.AlignVCenter, bold = 0) | def DrawText(self, data, side, attr, (x0, x1), (y0, y1), totalAttrs, lastValueForFirstAttribute): if self.drawnSides[side]: return if side == RIGHT and lastValueForFirstAttribute != 2: return if not data or len(data) == 0: if not self.drawPositions.has_key(side): self.drawPositions[side] = (x0, x1, y0, y1) return else: if self.drawPositions.has_key(side): (x0, x1, y0, y1) = self.drawPositions[side] # restore the positions where we have to draw the attribute values and attribute name self.drawnSides[side] = 1 | 4617629279f24e162a43e27a838ac49ba8cc40ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/4617629279f24e162a43e27a838ac49ba8cc40ec/OWMosaicDisplay.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10184,
1528,
12,
2890,
16,
501,
16,
4889,
16,
1604,
16,
261,
92,
20,
16,
619,
21,
3631,
261,
93,
20,
16,
677,
21,
3631,
2078,
8262,
16,
1142,
620,
1290,
3759,
1499,
4672,
309,
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,
10184,
1528,
12,
2890,
16,
501,
16,
4889,
16,
1604,
16,
261,
92,
20,
16,
619,
21,
3631,
261,
93,
20,
16,
677,
21,
3631,
2078,
8262,
16,
1142,
620,
1290,
3759,
1499,
4672,
309,
365,
... |
ret = decompress(data) | ret = bz2.decompress(data) | def decompress(self, data): pop = popen2.Popen3("bunzip2", capturestderr=1) pop.tochild.write(data) pop.tochild.close() ret = pop.fromchild.read() pop.fromchild.close() if pop.wait() != 0: ret = decompress(data) return ret | df273a376d6adfdd8eb639f3c53f0e2adedd2363 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/df273a376d6adfdd8eb639f3c53f0e2adedd2363/test_bz2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
16824,
12,
2890,
16,
501,
4672,
1843,
273,
30925,
22,
18,
52,
3190,
23,
2932,
70,
318,
4450,
22,
3113,
7477,
11241,
33,
21,
13,
1843,
18,
869,
3624,
18,
2626,
12,
892,
13,
1843,
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,
16824,
12,
2890,
16,
501,
4672,
1843,
273,
30925,
22,
18,
52,
3190,
23,
2932,
70,
318,
4450,
22,
3113,
7477,
11241,
33,
21,
13,
1843,
18,
869,
3624,
18,
2626,
12,
892,
13,
1843,
18,
... |
meanPropAvg,stdPropAvg = getLinearStats([bin['%s_avg'%self.refString] for val in bins.values()], len(bins)) | print self.refString,self.ref meanPropAvg,stdPropAvg = getLinearStats([bin['%s_avg'%self.refString] for bin in self.bins.values()], len(self.bins)) | def Plot(self): binVals = [] width = round(self.xbin / self.xPixelSize) height = round(self.ybin / self.yPixelSize) | 5b85d4b7cee3ebafc70b413e441b63e7e8639989 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6163/5b85d4b7cee3ebafc70b413e441b63e7e8639989/ConfDistFuncs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15211,
12,
2890,
4672,
225,
4158,
13169,
273,
5378,
1835,
282,
273,
3643,
12,
2890,
18,
92,
4757,
342,
365,
18,
92,
9037,
1225,
13,
2072,
225,
273,
3643,
12,
2890,
18,
93,
4757,
342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
15211,
12,
2890,
4672,
225,
4158,
13169,
273,
5378,
1835,
282,
273,
3643,
12,
2890,
18,
92,
4757,
342,
365,
18,
92,
9037,
1225,
13,
2072,
225,
273,
3643,
12,
2890,
18,
93,
4757,
342,
... |
questionFmt = _(u'\u201c%(displayName)s\u201d is a recurring event. Changing its recurrence may cause some events to be deleted. Do you want to change:') | questionFmt = _(u'"%(displayName)s" is a recurring event. Changing its recurrence may cause some events to be deleted. Do you want to change:') | def runDialog(self): # Check in case the dialog somehow got cancelled if self.dialogUp: | 21f5e20bd58ce4382c5cd07c6c089d6e209d3b5a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/21f5e20bd58ce4382c5cd07c6c089d6e209d3b5a/RecurrenceDialog.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
6353,
12,
2890,
4672,
468,
2073,
316,
648,
326,
6176,
28578,
2363,
13927,
309,
365,
18,
12730,
1211,
30,
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,
1086,
6353,
12,
2890,
4672,
468,
2073,
316,
648,
326,
6176,
28578,
2363,
13927,
309,
365,
18,
12730,
1211,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for i in range(10): | pid = None for i in range(8): | def getMunkiStatusSocket(): for i in range(10): pid = getMunkiStatusPID() if pid: socketpath = "/tmp/com.googlecode.munki.munkistatus.%s" % pid if os.path.exists(socketpath): return socketpath else: # sleep and try again time.sleep(.5) return "" | 1c1c8ab7a06eeba7c1260848025c501a58e27c67 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6241/1c1c8ab7a06eeba7c1260848025c501a58e27c67/munkistatus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
1683,
77,
1482,
4534,
13332,
4231,
273,
599,
364,
277,
316,
1048,
12,
28,
4672,
4231,
273,
2108,
1683,
77,
1482,
16522,
1435,
309,
4231,
30,
2987,
803,
273,
2206,
5645,
19,
832,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
1683,
77,
1482,
4534,
13332,
4231,
273,
599,
364,
277,
316,
1048,
12,
28,
4672,
4231,
273,
2108,
1683,
77,
1482,
16522,
1435,
309,
4231,
30,
2987,
803,
273,
2206,
5645,
19,
832,
... |
raise ValueError("Problem parsing the alignment sequence coordinates") | raise ValueError("Problem parsing the alignment sequence coordinates, " "following should be the same length but are not:\n" "%s - len %i\n%s - len %i" % (query_align_seq, len(query_align_seq), match_align_seq, len(match_align_seq))) | def next(self) : """Reads from the handle to construct and return the next alignment. | 7f185b7a64bc0360a91f1864bc960d71fc368ae0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/7f185b7a64bc0360a91f1864bc960d71fc368ae0/FastaIO.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
13,
294,
3536,
7483,
628,
326,
1640,
358,
4872,
471,
327,
326,
1024,
8710,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
12,
2890,
13,
294,
3536,
7483,
628,
326,
1640,
358,
4872,
471,
327,
326,
1024,
8710,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
if x == 0: x = 0 else: | if x != 0: | def __getitem__(self, x): if isinstance(x, slice): if x.step is not None: raise NotImplementedError, x if x.start is None: start = 0 else: start = self[x.start] if x.stop is None: stop = len(self) else: stop = self[x.stop] return slice(start, stop) # map log(x) to the domain [0, 1] try: x = math.log(x) except OverflowError: if x == 0: x = 0 else: x = 1 else: x = math.atan(float(x - self.mid) * self.scale) / math.pi + 0.5 if x < 1: return int(math.floor(x / self.delta)) # x == 1, special "measure zero" corner case return len(self) - 1 | cc78d51aa09f39eb5ebfdb8665062f12c737b0fe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/cc78d51aa09f39eb5ebfdb8665062f12c737b0fe/rate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
619,
4672,
309,
1549,
12,
92,
16,
2788,
4672,
309,
619,
18,
4119,
353,
486,
599,
30,
1002,
11206,
16,
619,
309,
619,
18,
1937,
353,
599,
30,
787,
273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
31571,
972,
12,
2890,
16,
619,
4672,
309,
1549,
12,
92,
16,
2788,
4672,
309,
619,
18,
4119,
353,
486,
599,
30,
1002,
11206,
16,
619,
309,
619,
18,
1937,
353,
599,
30,
787,
273,... |
attr:: An integer specifying the attribute. value:: An integer specifying its value. | @param attr:: An integer specifying the attribute. @param value:: An integer specifying its value. | def set_hal_attr(attr, value): """ Sets the specified HAL attribute to the specified value. attr:: An integer specifying the attribute. value:: An integer specifying its value. """ pass | 88b8a1bd1deaae376f22144e433e9a82abe1b629 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12774/88b8a1bd1deaae376f22144e433e9a82abe1b629/miso.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
22314,
67,
1747,
12,
1747,
16,
460,
4672,
3536,
11511,
326,
1269,
670,
1013,
1566,
358,
326,
1269,
460,
18,
632,
891,
1604,
2866,
1922,
3571,
13664,
326,
1566,
18,
632,
891,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
67,
22314,
67,
1747,
12,
1747,
16,
460,
4672,
3536,
11511,
326,
1269,
670,
1013,
1566,
358,
326,
1269,
460,
18,
632,
891,
1604,
2866,
1922,
3571,
13664,
326,
1566,
18,
632,
891,
4... |
clause.append('%s = \'%s\'' % (constraints[i], vals[j])) | clause.append('%s = \'%s\'' % (constraints[i], vals[j].value)) | def render(self): self.perm.assert_permission(perm.TICKET_VIEW) | 2efaf8f378fee962b98bca45ed962727c8a9c381 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2efaf8f378fee962b98bca45ed962727c8a9c381/Ticket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
56,
16656,
1584,
67,
12145,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1743,
12,
2890,
4672,
365,
18,
12160,
18,
11231,
67,
9827,
12,
12160,
18,
56,
16656,
1584,
67,
12145,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
return (blocks_size, blocks, blocks_free, files, files_free, namelen) | return (blocks_size, blocks, blocks - blocks_free, blocks_free, files, files_free, namelen) | def statfs(self): """ Should return a tuple with the following 6 elements: - blocksize - size of file blocks, in bytes - totalblocks - total number of blocks in the filesystem - freeblocks - number of free blocks - totalfiles - total number of file inodes - freefiles - nunber of free file inodes Feel free to set any of the above values to 0, which tells the kernel that the info is not available. """ print "xmp.py:Xmp:statfs: returning fictitious values" blocks_size = 1024 blocks = 100000 blocks_free = 25000 files = 100000 files_free = 60000 namelen = 80 return (blocks_size, blocks, blocks_free, files, files_free, namelen) | 5a61be174c15dabe22a63c169444d9545a09d5ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5459/5a61be174c15dabe22a63c169444d9545a09d5ed/xmp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
610,
2556,
12,
2890,
4672,
3536,
9363,
327,
279,
3193,
598,
326,
3751,
1666,
2186,
30,
300,
18440,
300,
963,
434,
585,
4398,
16,
316,
1731,
300,
2078,
7996,
300,
2078,
1300,
434,
4398,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
610,
2556,
12,
2890,
4672,
3536,
9363,
327,
279,
3193,
598,
326,
3751,
1666,
2186,
30,
300,
18440,
300,
963,
434,
585,
4398,
16,
316,
1731,
300,
2078,
7996,
300,
2078,
1300,
434,
4398,
... |
date = datetime.strptime(datestr,"%Y-%m-%dT%H:%M:%S") | date = datetime(*time.strptime(datestr,"%Y-%m-%dT%H:%M:%S")[:-2]) | def populate_table(self): blamedict = self.action.get_result(0) | 6c8a655a713079af39aa5e2357e061a2e599283b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5119/6c8a655a713079af39aa5e2357e061a2e599283b/annotate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6490,
67,
2121,
12,
2890,
4672,
2811,
2808,
933,
273,
365,
18,
1128,
18,
588,
67,
2088,
12,
20,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6490,
67,
2121,
12,
2890,
4672,
2811,
2808,
933,
273,
365,
18,
1128,
18,
588,
67,
2088,
12,
20,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
svntest.main.run_svn(None, 'ps', 'foo', 'bar', os.path.join(wc_dir, 'A', 'D')) | svntest.main.run_svn(None, 'ps', 'foo', 'bar', D_path) | def hudson_part_2(sbox): "hudson prob 2.0: prop commit on old dir fails." if sbox.build(): return 1 wc_dir = sbox.wc_dir # Remove gamma from the working copy. gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma') svntest.main.run_svn(None, 'rm', gamma_path) # Create expected commit output. output_list = [ [gamma_path, None, {}, {'verb' : 'Deleting' }] ] expected_output_tree = svntest.tree.build_generic_tree(output_list) # After committing, status should show no sign of gamma. status_list = svntest.actions.get_virginal_status_list(wc_dir, '2') for item in status_list: item[3]['wc_rev'] = '1' status_list.pop(path_index(status_list, gamma_path)) expected_status_tree = svntest.tree.build_generic_tree(status_list) # Commit the deletion of gamma and verify. if svntest.actions.run_and_verify_commit (wc_dir, expected_output_tree, expected_status_tree, None, None, None, None, None, wc_dir): return 1 # Now gamma should be marked as `deleted' under the hood, at # revision 2. Meanwhile, A/D is still lagging at revision 1. # Make a propchange on A/D svntest.main.run_svn(None, 'ps', 'foo', 'bar', os.path.join(wc_dir, 'A', 'D')) # Commit and *expect* a repository Merge failure: return svntest.actions.run_and_verify_commit (wc_dir, None, None, "out-of-date", None, None, None, None, wc_dir) | bef715c07d7b6fef7f86f14bcf1250ffbbbc4849 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6036/bef715c07d7b6fef7f86f14bcf1250ffbbbc4849/commit_tests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
1100,
816,
67,
2680,
67,
22,
12,
87,
2147,
4672,
315,
76,
1100,
816,
3137,
576,
18,
20,
30,
225,
2270,
3294,
603,
1592,
1577,
6684,
1199,
225,
309,
272,
2147,
18,
3510,
13332,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
366,
1100,
816,
67,
2680,
67,
22,
12,
87,
2147,
4672,
315,
76,
1100,
816,
3137,
576,
18,
20,
30,
225,
2270,
3294,
603,
1592,
1577,
6684,
1199,
225,
309,
272,
2147,
18,
3510,
13332,
3... |
if line.find("time") < 0: | elif line.find("time") >= 0: continue elif line.find("(sec)") >= 0: continue else: | def nextline(f): while True: line = f.readline() if line == '': break line = line.strip() if line == '' or line[0] == '#': continue if line.find("time") < 0: break return line | 4e9c99513eaec562a41560850438e4346a27101b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5963/4e9c99513eaec562a41560850438e4346a27101b/lammps_cmp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1024,
1369,
12,
74,
4672,
1323,
1053,
30,
980,
273,
284,
18,
896,
1369,
1435,
309,
980,
422,
875,
30,
898,
980,
273,
980,
18,
6406,
1435,
309,
980,
422,
875,
578,
980,
63,
20,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1369,
12,
74,
4672,
1323,
1053,
30,
980,
273,
284,
18,
896,
1369,
1435,
309,
980,
422,
875,
30,
898,
980,
273,
980,
18,
6406,
1435,
309,
980,
422,
875,
578,
980,
63,
20,
65,
... |
fields.append(self.Field()) | fields.append(self.Field(self)) | def fromDom(node): self.setAttributes(node) contents = self.getContents(node) fields = [] | 0f22280071ba54237b2f9c645f8fa9542d57d244 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/0f22280071ba54237b2f9c645f8fa9542d57d244/XMLSchema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
628,
8832,
12,
2159,
4672,
365,
18,
542,
2498,
12,
2159,
13,
2939,
273,
365,
18,
588,
6323,
12,
2159,
13,
1466,
273,
5378,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
628,
8832,
12,
2159,
4672,
365,
18,
542,
2498,
12,
2159,
13,
2939,
273,
365,
18,
588,
6323,
12,
2159,
13,
1466,
273,
5378,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
cmds = ( ['gnt-cluster', '--version'], | cmds = ( ['gnt-backup', '--version'], ['gnt-cluster', '--version'], ['gnt-debug', '--version'], ['gnt-instance', '--version'], ['gnt-job', '--version'], ['gnt-node', '--version'], | def TestGanetiCommands(): """Test availibility of Ganeti commands. """ cmds = ( ['gnt-cluster', '--version'], ['gnt-os', '--version'], ['gnt-node', '--version'], ['gnt-instance', '--version'], ['gnt-backup', '--version'], ['ganeti-noded', '--version'], ['ganeti-watcher', '--version'] ) cmd = ' && '.join([utils.ShellQuoteArgs(i) for i in cmds]) for node in qa_config.get('nodes'): AssertEqual(StartSSH(node['primary'], cmd).wait(), 0) | fc28c086423109b6d16ac47200a0cd7014b26922 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/fc28c086423109b6d16ac47200a0cd7014b26922/qa_env.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7766,
43,
304,
278,
77,
9127,
13332,
3536,
4709,
15783,
3628,
434,
611,
304,
278,
77,
4364,
18,
225,
3536,
13446,
273,
261,
10228,
75,
496,
17,
9572,
2187,
3534,
1589,
17337,
10228,
75,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7766,
43,
304,
278,
77,
9127,
13332,
3536,
4709,
15783,
3628,
434,
611,
304,
278,
77,
4364,
18,
225,
3536,
13446,
273,
261,
10228,
75,
496,
17,
9572,
2187,
3534,
1589,
17337,
10228,
75,
... |
self._list_counter = -2 | self.list_counter.append(-2) | def visit_definition_list(self, node): self._list_counter = -2 | e20b3a3adf8de70986f2805e2d77e2bc11ff74aa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/e20b3a3adf8de70986f2805e2d77e2bc11ff74aa/text.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
6907,
67,
1098,
12,
2890,
16,
756,
4672,
365,
6315,
1098,
67,
7476,
273,
300,
22,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3757,
67,
6907,
67,
1098,
12,
2890,
16,
756,
4672,
365,
6315,
1098,
67,
7476,
273,
300,
22,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if(target == "ml"): tolerance = 1.5 else: tolerance = 1.e-6 | def exercise(space_group_info, n_elements = 10, sf_cos_sin_table = False, sf_algorithm = "direct", table = "wk1995", d_min = 2.0, k_sol = 0.35, b_sol = 45.0, b_cart = None): xray_structure = random_structure.xray_structure( space_group_info = space_group_info, elements =(("O","N","C")*(n_elements/3+1))[:n_elements], volume_per_atom = 100, min_distance = 1.5, general_positions_only = True, random_u_iso = False, random_occupancy = False) xray_structure.scattering_type_registry(table = table) sg = xray_structure.space_group() uc = xray_structure.unit_cell() u_cart_1 = adptbx.random_u_cart(u_scale=5, u_min=5) u_star_1 = adptbx.u_cart_as_u_star(uc, u_cart_1) b_cart = adptbx.u_star_as_u_cart(uc, sg.average_u_star(u_star = u_star_1)) for anomalous_flag in [False, True]: f_obs = abs(xray_structure.structure_factors( d_min = d_min, anomalous_flag = anomalous_flag, cos_sin_table = sf_cos_sin_table, algorithm = sf_algorithm).f_calc()) f_obs_comp = f_obs.structure_factors_from_scatterers( xray_structure = xray_structure, algorithm = sf_algorithm, cos_sin_table = sf_cos_sin_table).f_calc() f_obs = abs(f_obs_comp) flags = f_obs.generate_r_free_flags(fraction = 0.1, max_free = 99999999) #flags = flags.array(data = flex.bool(f_obs.data().size(), False)) xrs = xray_structure.deep_copy_scatterers() xrs.shake_sites_in_place(rms_difference=0.3) for target in mmtbx.f_model.manager.target_names: if(target == "mlhl"): continue #XXX Must find out why ml-tolerance is so BIG. if(target == "ml"): tolerance = 1.5 else: tolerance = 1.e-6 print " ",target xray.set_scatterer_grad_flags( scatterers = xrs.scatterers(), site = True) fmodel = mmtbx.f_model.manager( xray_structure = xrs, f_obs = f_obs, r_free_flags = flags, target_name = target, sf_cos_sin_table = sf_cos_sin_table, sf_algorithm = sf_algorithm, k_sol = k_sol, b_sol = b_sol, b_cart = b_cart, mask_params = mask_params()) fmodel.update_xray_structure(xray_structure = xrs, update_f_calc = True, update_f_mask = True) if(0): fmodel.show_essential() print f_obs.data().size() if(0): fmodel.show_comprehensive() print f_obs.data().size() gs = flex.vec3_double( fmodel.gradient_wrt_atomic_parameters(site = True).packed()) xray.set_scatterer_grad_flags( scatterers = fmodel.xray_structure.scatterers(), site = True) gfd = finite_differences_site(cartesian_flag = True, fmodel = fmodel) diff = (gs - gfd).as_double() assert approx_equal(abs(flex.min(diff) ), 0.0, tolerance) assert approx_equal(abs(flex.mean(diff)), 0.0, tolerance) assert approx_equal(abs(flex.max(diff) ), 0.0, tolerance) fmodel.model_error_ml() | e48cd5794796abe8fe7acd92d168f26a4e2d53b0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/696/e48cd5794796abe8fe7acd92d168f26a4e2d53b0/tst_fmodel_fd.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24165,
12,
2981,
67,
1655,
67,
1376,
16,
290,
67,
6274,
4202,
273,
1728,
16,
9033,
67,
14445,
67,
21861,
67,
2121,
273,
1083,
16,
9033,
67,
12743,
377,
273,
315,
7205,
3113,
1014,
5411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24165,
12,
2981,
67,
1655,
67,
1376,
16,
290,
67,
6274,
4202,
273,
1728,
16,
9033,
67,
14445,
67,
21861,
67,
2121,
273,
1083,
16,
9033,
67,
12743,
377,
273,
315,
7205,
3113,
1014,
5411... | |
(<InterfaceClass zope.app.container.interfaces.IAdding>, | (<InterfaceClass zope.browser.interfaces.IAdding>, | def test_w_factory_layer(): """ >>> context = Context() >>> addMenuItem(context, factory="x.y.z", title="Add an X", layer=ILayerStub, ... permission="zope.ManageContent", description="blah blah", ... filter="context/foo") >>> context ((('adapter', (<InterfaceClass zope.app.container.interfaces.IAdding>, <InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.ILayerStub>), <InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>, 'Add an X'), <function handler>, ('registerAdapter', <zope.app.publisher.browser.menumeta.MenuItemFactory object>, (<InterfaceClass zope.app.container.interfaces.IAdding>, <InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.ILayerStub>), <InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>, 'Add an X', ''), {}), (None, <function provideInterface>, ('', <InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>), {}), (None, <function provideInterface>, ('', <InterfaceClass zope.app.container.interfaces.IAdding>), {}), (None, <function provideInterface>, ('', <InterfaceClass zope.app.publisher.browser.tests.test_addMenuItem.ILayerStub>), {})) """ | fbba0f8152d0bc2c5300c11c00b233b98debb605 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9523/fbba0f8152d0bc2c5300c11c00b233b98debb605/test_addMenuItem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
91,
67,
6848,
67,
6363,
13332,
3536,
4080,
819,
273,
1772,
1435,
4080,
527,
12958,
12,
2472,
16,
3272,
1546,
92,
18,
93,
18,
94,
3113,
2077,
1546,
986,
392,
1139,
3113,
3018,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
91,
67,
6848,
67,
6363,
13332,
3536,
4080,
819,
273,
1772,
1435,
4080,
527,
12958,
12,
2472,
16,
3272,
1546,
92,
18,
93,
18,
94,
3113,
2077,
1546,
986,
392,
1139,
3113,
3018,... |
except NoSuchTableError: | except NoSuchTableError, e: self.logger.error(e) | def activate(self, conffile = None): self.logger = logging.getLogger() if self.is_activated: return None | 99785cbb2e0f66a6268e796011d2611806a57e8f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/99785cbb2e0f66a6268e796011d2611806a57e8f/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10235,
12,
2890,
16,
2195,
768,
273,
599,
4672,
365,
18,
4901,
273,
2907,
18,
588,
3328,
1435,
309,
365,
18,
291,
67,
18836,
30,
327,
599,
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,
10235,
12,
2890,
16,
2195,
768,
273,
599,
4672,
365,
18,
4901,
273,
2907,
18,
588,
3328,
1435,
309,
365,
18,
291,
67,
18836,
30,
327,
599,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
if ( (not db_ver_inc_map.has_key(db_ver)) and | if ( (db_ver not in db_ver_inc_map) and | def gen_db_minor_ver_nums(major): if major == 4: for x in range(max_db_ver[1]+1): if allow_db_ver((4, x)): yield x elif major == 3: for x in (3,): if allow_db_ver((3, x)): yield x else: raise ValueError("unknown major BerkeleyDB version", major) | 8c510e704e3823df66c2c3ad85912c9a9dda7f14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/8c510e704e3823df66c2c3ad85912c9a9dda7f14/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
1966,
67,
17364,
67,
502,
67,
21180,
12,
14019,
4672,
309,
7888,
422,
1059,
30,
364,
619,
316,
1048,
12,
1896,
67,
1966,
67,
502,
63,
21,
3737,
21,
4672,
309,
1699,
67,
196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
67,
1966,
67,
17364,
67,
502,
67,
21180,
12,
14019,
4672,
309,
7888,
422,
1059,
30,
364,
619,
316,
1048,
12,
1896,
67,
1966,
67,
502,
63,
21,
3737,
21,
4672,
309,
1699,
67,
196... |
elif isinstance(value, Str): | elif isinstance(value, str): | def convert_from_wx_color(obj, name, value): if isinstance(value, ColourPtr) or isinstance(value, wx.Colour): return (value.Red()/255.0, value.Green()/255.0, value.Blue()/255.0, 1.0) elif isinstance(value, Str): return color_table.get(value, transparent_color) elif type(value) is int: num = int( value ) return ((num >> 16)/255.0, ((num>>8) & 0xFF)/255.0, (num & 0xFF)/255.0, 1.0) elif type(value) in (list, tuple): if len(value) == 3: return (value[0]/255.0, value[1]/255.0, value[2]/255.0, 1.0) elif len(value) == 4: return value else: raise TraitError else: raise TraitError | 4e48caf057c8baeb6c6a8dcd449a2f12b4be3a15 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13166/4e48caf057c8baeb6c6a8dcd449a2f12b4be3a15/colors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
2080,
67,
27226,
67,
3266,
12,
2603,
16,
508,
16,
460,
4672,
309,
1549,
12,
1132,
16,
1558,
477,
5263,
13,
578,
1549,
12,
1132,
16,
7075,
18,
26404,
4672,
327,
261,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1765,
67,
2080,
67,
27226,
67,
3266,
12,
2603,
16,
508,
16,
460,
4672,
309,
1549,
12,
1132,
16,
1558,
477,
5263,
13,
578,
1549,
12,
1132,
16,
7075,
18,
26404,
4672,
327,
261,
1132,
1... |
row = selectOneInTable('virtualhosts', 'max(id)') | row = selectOneInTable('virtualhosts', 'max(id)', "apache_id = %s and servername = '%s'"%(apache_id, servername)) | def analyze_conf(conf_file, apache_name, server_id): """ read an apache conf file """ global serverroot, log if not os.path.isfile(conf_file): error("Filename passed is not a file : '%s'"%conf_file) return verbose("Working on '%s'"%conf_file) if not insertInTable('apaches', "name, conf_file, creationdate, server_id", "'%s', '%s', '%s', %s"%(apache_name, conf_file, now, server_id)): sys.exit(1) apache_id = 0 row = selectOneInTable('apaches', 'id', "conf_file = '%s' and server_id = %s"%(conf_file, server_id)) if row: apache_id = row[0] try: cfile = open( conf_file, 'r') except IOError: error("Cannot open %s file" % conf_file) return vhost = servername = log_vh = redirect_code = redirect_from = redirect_to = servernameip = protocol = vh_ip = '' rewrites = [] lnb = 0 for line in cfile.readlines(): lnb += 1 line = line.strip(' \t\n') if not line or line[0] == '#': continue #<VirtualHost 62.58.108.100:80> res = pat_virtualhost.match(line) if res: vhost = res.group(1) if vhost.find(':') > 0: (vh_ip, port) = vhost.split(':') protocol = (port == '80' and 'http' or (port == '443' and 'https' or '')) continue #ServerName www.communesplone.be res = pat_servername.match(line) if res: servername = res.group(1) servernameip = getServernameIP(servername) continue #ServerRoot "/usr/local/apache2OCSP" res = pat_serverroot.match(line) if res: if serverroot: error("Already a server root for this apache '%s' <=> '%s'"%(serverroot,res.group(1))) else: serverroot = res.group(1) continue #CustomLog /var/apache_logs/communesplone_access.log combined res = pat_log.match(line) if res: if vhost: log_vh = res.group(1) elif log: error("Already a server log for this apache '%s' <=> '%s'"%(log,res.group(1))) else: log = res.group(1) #RewriteRule ^/floreffe(.*) http://localhost:9009/VirtualHostBase/http/www.communesplone.be:80/floreffe/floreffe/VirtualHostRoot/_vh_floreffe/$1 [P,L] #RewriteRule ^/(.*) http://localhost:9009/VirtualHostBase/https/andenne.lescommunes.be:443/andenne/andenne/VirtualHostRoot/$1 [L,P] #pat_rw_begin = re.compile(r'^rewriterule +', re.I) #pat_rw_other = re.compile(r'^rewriterule +\^?/(stats|awstats|svn/|trac(/|\$))', re.I) #pat_rw_zope = re.compile(r'^rewriterule +\^?/([\w-]*)(?:\(\.\*\)?) +http://localhost:(\d+)/VirtualHostBase/(https?)/([\w\-\.]+):(\d+)/([\w\-/]+)/VirtualHostRoot/', re.I) if pat_rw_begin.match(line): res = pat_rw_other.match(line) if res: continue res = pat_rw_zope.match(line) if res: rewrites.append((res.group(1), res.group(2), res.group(3), res.group(4), res.group(5), res.group(6))) | 67672068af327e01af35e56a51bab1a7b2dc8382 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5504/67672068af327e01af35e56a51bab1a7b2dc8382/apache_repository_db.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
67,
3923,
12,
3923,
67,
768,
16,
12291,
67,
529,
16,
1438,
67,
350,
4672,
3536,
855,
392,
12291,
2195,
585,
3536,
2552,
1438,
3085,
16,
613,
309,
486,
1140,
18,
803,
18,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12375,
67,
3923,
12,
3923,
67,
768,
16,
12291,
67,
529,
16,
1438,
67,
350,
4672,
3536,
855,
392,
12291,
2195,
585,
3536,
2552,
1438,
3085,
16,
613,
309,
486,
1140,
18,
803,
18,
291,
... |
return '' | return 0 | def send(self, data): try: result = self.socket._write_nbio(data) if result <= 0: return 0 else: self.server.bytes_out.increment(result) return result except SSL.SSLError, why: self.close() self.log_info('send: closing channel %s %s' % (repr(self), why)) return '' | 7b7d6cb67ada3c21c5aef07954634c6104f5acf3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/7b7d6cb67ada3c21c5aef07954634c6104f5acf3/https_server.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1366,
12,
2890,
16,
501,
4672,
775,
30,
563,
273,
365,
18,
7814,
6315,
2626,
67,
6423,
1594,
12,
892,
13,
309,
563,
1648,
374,
30,
327,
374,
469,
30,
365,
18,
3567,
18,
3890,
67,
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,
1366,
12,
2890,
16,
501,
4672,
775,
30,
563,
273,
365,
18,
7814,
6315,
2626,
67,
6423,
1594,
12,
892,
13,
309,
563,
1648,
374,
30,
327,
374,
469,
30,
365,
18,
3567,
18,
3890,
67,
6... |
xmlnode.newTextChild(None,"group",g) | xmlnode.newTextChild(None, "group", to_utf8(g)) | def complete_xml_element(self, xmlnode, _unused): """Complete the XML node with `self` content. | 62b7d0d76bfe9e03a37c2244101c40ce5792dda7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12769/62b7d0d76bfe9e03a37c2244101c40ce5792dda7/roster.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3912,
67,
2902,
67,
2956,
12,
2890,
16,
2025,
2159,
16,
389,
14375,
4672,
3536,
6322,
326,
3167,
756,
598,
1375,
2890,
68,
913,
18,
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,
0,
0,
0,
0,
0,
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,
3912,
67,
2902,
67,
2956,
12,
2890,
16,
2025,
2159,
16,
389,
14375,
4672,
3536,
6322,
326,
3167,
756,
598,
1375,
2890,
68,
913,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if not self._file_is_in_local_cache(local_filename): return False conn = httplib.HTTPConnection(self.host) try: conn.request("GET", self.filename) except socket.gaierror, e: return True response = conn.getresponse() mod_header = response.msg.getheader('last-modified') if not mod_header: return False if self._is_outdated(mod_header, local_filename): return False return True | return self._file_is_in_local_cache(local_filename) | def is_cacheable(self): self.checkInputPort('url') url = self.getInputFromPort('url') local_filename = self._local_filename(url) # If file is not in cache, then we must re-run if not self._file_is_in_local_cache(local_filename): return False conn = httplib.HTTPConnection(self.host) try: conn.request("GET", self.filename) except socket.gaierror, e: # We could not get to the net, but file exists in local # cache, so we'll simply reuse it return True response = conn.getresponse() mod_header = response.msg.getheader('last-modified') if not mod_header: # server did not return a last-modified, assume cannot cache return False if self._is_outdated(mod_header, local_filename): return False return True | 3799edddbb6254c23d46c7398cada557b57fee17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6341/3799edddbb6254c23d46c7398cada557b57fee17/init.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2493,
429,
12,
2890,
4672,
365,
18,
1893,
1210,
2617,
2668,
718,
6134,
880,
273,
365,
18,
588,
1210,
1265,
2617,
2668,
718,
6134,
1191,
67,
3459,
273,
365,
6315,
3729,
67,
345... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
2493,
429,
12,
2890,
4672,
365,
18,
1893,
1210,
2617,
2668,
718,
6134,
880,
273,
365,
18,
588,
1210,
1265,
2617,
2668,
718,
6134,
1191,
67,
3459,
273,
365,
6315,
3729,
67,
345... |
return self.result(data, node) | return data, self.result(data, node) | def __process(self, node, type=None): """ Process the specified node and convert the XML document into a L{suds} object. @param node: An XML fragment. @type node: L{sax.Element} @param type: The I{optional} schema type. @type type: L{schema.SchemaProperty} @return: A suds object. @rtype: L{Object} @note: This is not the proper entry point. @see: L{process()} """ data = self.start(node, type) self.import_attrs(data, node) self.import_children(data, node) self.import_text(data, node) self.end(node, data) return self.result(data, node) | 5bb832fef7781f711009a94b9097fdeadda4dd79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1242/5bb832fef7781f711009a94b9097fdeadda4dd79/unmarshaller.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2567,
12,
2890,
16,
756,
16,
618,
33,
7036,
4672,
3536,
4389,
326,
1269,
756,
471,
1765,
326,
3167,
1668,
1368,
279,
511,
95,
87,
1100,
87,
97,
733,
18,
632,
891,
756,
30,
1922... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2567,
12,
2890,
16,
756,
16,
618,
33,
7036,
4672,
3536,
4389,
326,
1269,
756,
471,
1765,
326,
3167,
1668,
1368,
279,
511,
95,
87,
1100,
87,
97,
733,
18,
632,
891,
756,
30,
1922... |
mustunicode = 0 for s, c in pairs: if c and c <> 'us-ascii' and c <> self.charset: mustunicode = 1 break if mustunicode: try: h = make_header(pairs, 99999) return h.__unicode__(), None except (UnicodeError, LookupError): return None, None | try: h = make_header(pairs, 99999) return h.__unicode__() except (UnicodeError, LookupError): return None | def decode_charset(self, field): if field.find("=?") == -1: return None, None # Get the decoded header as a list of (s, charset) tuples pairs = decode_header(field) mustunicode = 0 for s, c in pairs: # If the charset of all the header parts match the article's # charset, leave it as encoded, otherwise try converting to # Unicode. if c and c <> 'us-ascii' and c <> self.charset: mustunicode = 1 break if mustunicode: # Use __unicode__() until we can guarantee Python 2.2 try: # Use a large number for maxlinelen so it won't get wrapped h = make_header(pairs, 99999) return h.__unicode__(), None except (UnicodeError, LookupError): # Unknown encoding return None, None # The last value for c will have the proper charset in it return EMPTYSTRING.join([s for s, c in pairs]), c | 4616e826ade7dba7eafa7e61bb5fa387d722335c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/4616e826ade7dba7eafa7e61bb5fa387d722335c/HyperArch.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
67,
9999,
12,
2890,
16,
652,
4672,
309,
652,
18,
4720,
2932,
25501,
13,
422,
300,
21,
30,
327,
599,
16,
599,
468,
968,
326,
6383,
1446,
487,
279,
666,
434,
261,
87,
16,
4856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
67,
9999,
12,
2890,
16,
652,
4672,
309,
652,
18,
4720,
2932,
25501,
13,
422,
300,
21,
30,
327,
599,
16,
599,
468,
968,
326,
6383,
1446,
487,
279,
666,
434,
261,
87,
16,
4856,
... |
ret = {'result' : ret} | def ajax_getcredits(request): ret = [] if request.method == u'POST': for i in range(2,10): ret.append({'username' : "user" + str(i+1), 'percent' : i+i / 2}) print "returning ret: ", str(ret) ret = {'result' : ret} json = simplejson.dumps(ret) print "json object is ", str(json) return HttpResponse(json, mimetype='application/json') | fce57870765d26f99816f348767b6f473c9d6d7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/fce57870765d26f99816f348767b6f473c9d6d7b/views.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10733,
67,
588,
20610,
1282,
12,
2293,
4672,
325,
273,
5378,
309,
590,
18,
2039,
422,
582,
11,
3798,
4278,
364,
277,
316,
1048,
12,
22,
16,
2163,
4672,
325,
18,
6923,
12590,
11,
5053,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10733,
67,
588,
20610,
1282,
12,
2293,
4672,
325,
273,
5378,
309,
590,
18,
2039,
422,
582,
11,
3798,
4278,
364,
277,
316,
1048,
12,
22,
16,
2163,
4672,
325,
18,
6923,
12590,
11,
5053,
... | |
if isValidIP(element): ipList.append(element) | plainIPStr = plainIP.group(0) if DNSUtils.isValidIP(plainIPStr): ipList.append(plainIPStr) | def textToIp(text): """ Return the IP of DNS found in a given text. """ ipList = list() # Search for plain IP plainIP = DNSUtils.searchIP(text) if not plainIP == None: if isValidIP(element): ipList.append(element) if not ipList: # Try to get IP from possible DNS dnsList = DNSUtils.textToDns(text) if not dnsList == None: dns = DNSUtils.dnsToIp(element) for e in dns: ipList.append(e) return ipList | cca29af4a2a3b33a2c3b96ec7d0457d707c1516c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12786/cca29af4a2a3b33a2c3b96ec7d0457d707c1516c/filter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
977,
774,
5273,
12,
955,
4672,
3536,
2000,
326,
2971,
434,
8858,
1392,
316,
279,
864,
977,
18,
3536,
2359,
682,
273,
666,
1435,
468,
5167,
364,
7351,
2971,
7351,
2579,
273,
8858,
1989,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
977,
774,
5273,
12,
955,
4672,
3536,
2000,
326,
2971,
434,
8858,
1392,
316,
279,
864,
977,
18,
3536,
2359,
682,
273,
666,
1435,
468,
5167,
364,
7351,
2971,
7351,
2579,
273,
8858,
1989,
... |
fpformat.fix(task.dt*1000, 2).rjust(dtWidth), fpformat.fix(task.avgDt*1000, 2).rjust(dtWidth), fpformat.fix(task.maxDt*1000, 2).rjust(dtWidth), | dtfmt % (task.dt*1000), dtfmt % (task.avgDt*1000), dtfmt % (task.maxDt*1000), | def doOsd(self, task): if not onScreenDebug.enabled: return import fpformat prefix = TaskManager.OsdPrefix onScreenDebug.removeAllWithPrefix(prefix) taskNameWidth = 32 dtWidth = 10 priorityWidth = 10 totalDt = 0 totalAvgDt = 0 i = 0 onScreenDebug.add( ('%s%02i.taskList' % (prefix, i)).ljust(taskNameWidth), '%s %s %s %s' % ( 'dt(ms)'.rjust(dtWidth), 'avg'.rjust(dtWidth), 'max'.rjust(dtWidth), 'priority'.rjust(priorityWidth),)) i += 1 for taskPriList in self.taskList: priority = `taskPriList.getPriority()` for task in taskPriList: if task is None: break if task.isRemoved(): taskName = '(R)' + task.name else: taskName = task.name totalDt = totalDt + task.dt totalAvgDt = totalAvgDt + task.avgDt onScreenDebug.add( ('%s%02i.%s' % (prefix, i, task.name)).ljust(taskNameWidth), '%s %s %s %s' % ( fpformat.fix(task.dt*1000, 2).rjust(dtWidth), fpformat.fix(task.avgDt*1000, 2).rjust(dtWidth), fpformat.fix(task.maxDt*1000, 2).rjust(dtWidth), priority.rjust(priorityWidth))) i += 1 onScreenDebug.add(('%s%02i.total' % (prefix, i)).ljust(taskNameWidth), '%s %s' % ( fpformat.fix(totalDt*1000, 2).rjust(dtWidth), fpformat.fix(totalAvgDt*1000, 2).rjust(dtWidth),)) return cont | d300812b0d426bcde501f23e5e4f8a87f04857f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/d300812b0d426bcde501f23e5e4f8a87f04857f0/Task.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
51,
6427,
12,
2890,
16,
1562,
4672,
309,
486,
603,
7956,
2829,
18,
5745,
30,
327,
1930,
4253,
2139,
1633,
273,
3837,
1318,
18,
51,
6427,
2244,
603,
7956,
2829,
18,
4479,
1595,
119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
51,
6427,
12,
2890,
16,
1562,
4672,
309,
486,
603,
7956,
2829,
18,
5745,
30,
327,
1930,
4253,
2139,
1633,
273,
3837,
1318,
18,
51,
6427,
2244,
603,
7956,
2829,
18,
4479,
1595,
119... |
if name in self.record_schema: return self.record_schema[name] | if name in self.schema: return self.schema[name] | def get_datatype(self, name): # Table schema if name == 'ts': return DateTime(multiple=False) if name in self.record_schema: return self.record_schema[name] return String(multiple=True) | a7fbf395f73f5b5c9d9ccb9800c523703d0fefdc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/a7fbf395f73f5b5c9d9ccb9800c523703d0fefdc/table.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
21540,
12,
2890,
16,
508,
4672,
468,
3555,
1963,
309,
508,
422,
296,
3428,
4278,
327,
3716,
12,
9622,
33,
8381,
13,
309,
508,
316,
365,
18,
4821,
30,
327,
365,
18,
4821,
63,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
21540,
12,
2890,
16,
508,
4672,
468,
3555,
1963,
309,
508,
422,
296,
3428,
4278,
327,
3716,
12,
9622,
33,
8381,
13,
309,
508,
316,
365,
18,
4821,
30,
327,
365,
18,
4821,
63,... |
self.DoCapturedDragAndDrop() | self.DoCapturedDragAndDrop(copyOnly=True) | def OnMouseEvent(self, event): """ Handles mouse events, calls overridable methods related to: 1. Selecting an item 2. Dragging/moving an item 3. Resizing an item """ | 02beb375bc1699824ab5170e0f38ad48e11b1a6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/02beb375bc1699824ab5170e0f38ad48e11b1a6b/CollectionCanvas.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
9186,
1133,
12,
2890,
16,
871,
4672,
3536,
27020,
7644,
2641,
16,
4097,
5713,
27621,
2590,
3746,
358,
30,
404,
18,
6766,
310,
392,
761,
576,
18,
28425,
1998,
19,
81,
13767,
392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2755,
9186,
1133,
12,
2890,
16,
871,
4672,
3536,
27020,
7644,
2641,
16,
4097,
5713,
27621,
2590,
3746,
358,
30,
404,
18,
6766,
310,
392,
761,
576,
18,
28425,
1998,
19,
81,
13767,
392,
... |
self.assert_completion_in_result('samplemod', 'global', result) | self.assert_completion_in_result('samplemod', 'imported', result) | def test_simple_import(self): code = 'import samplemod\nsample' result = self._assist(code) self.assert_completion_in_result('samplemod', 'global', result) | 6d539fe256ff5d47931d765fcb7729894783cbf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8286/6d539fe256ff5d47931d765fcb7729894783cbf0/codeassisttest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
9647,
67,
5666,
12,
2890,
4672,
981,
273,
296,
5666,
3296,
1711,
64,
2387,
1511,
11,
563,
273,
365,
6315,
428,
376,
12,
710,
13,
365,
18,
11231,
67,
11469,
67,
267,
67,
208... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1842,
67,
9647,
67,
5666,
12,
2890,
4672,
981,
273,
296,
5666,
3296,
1711,
64,
2387,
1511,
11,
563,
273,
365,
6315,
428,
376,
12,
710,
13,
365,
18,
11231,
67,
11469,
67,
267,
67,
208... |
and constraints. index, if not None, should be a list of ints, at most one for each array dimension of the target value. | and constraints. index, if not None, should be a list of ints, at most one for each array dimension of the target value. | def set(self, path, value, index=None, srcname=None, force=False): """Set the value of the data object specified by the given path, which may contain '.' characters. If path specifies a Variable, then its value attribute will be set to the given value, subject to validation and constraints. index, if not None, should be a list of ints, at most one for each array dimension of the target value. """ assert(isinstance(path, basestring)) if path is None: if index is None: # should never get down this far self.raise_exception('this object cannot replace itself') else: self.raise_exception( 'Cannot set value at index %s'% str(index), AttributeError) tup = path.split('.') if len(tup) == 1: trait = self._check_trait_settable(path, srcname, force) if index is None: if trait is None: self.raise_exception("object has no attribute '%s'" % path, TraitError) # bypass the callback here and call it manually after # with a flag to tell it not to check if it's a destination self._trait_change_notify(False) try: setattr(self, path, value) finally: self._trait_change_notify(True) # now manually call the notifier with old set to Undefined # to avoid the destination check self._io_trait_changed(self, path, Undefined, getattr(self, path)) else: self._array_set(path, value, index) else: obj = getattr(self, tup[0], Missing) if obj is Missing: self.raise_exception("object has no attribute '%s'" % tup[0], TraitError) if len(tup) == 2: if isinstance(obj, Container): obj.set(tup[1], value, index, srcname=srcname, force=force) elif index is None: setattr(obj, tup[1], value) else: obj._array_set(tup[1], value, index) else: if isinstance(obj, Container): obj.set('.'.join(tup[1:]), value, index, force=force) elif index is not None: obj._array_set('.'.join(tup[1:]), value, index) else: self.raise_exception("object has no attribute '%s'" % path, TraitError) | 8586d67f5d42158f614b7fc3ff6c91066cfdb680 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12610/8586d67f5d42158f614b7fc3ff6c91066cfdb680/container.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12,
2890,
16,
589,
16,
460,
16,
770,
33,
7036,
16,
1705,
529,
33,
7036,
16,
2944,
33,
8381,
4672,
3536,
694,
326,
460,
434,
326,
501,
733,
1269,
635,
326,
225,
864,
589,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12,
2890,
16,
589,
16,
460,
16,
770,
33,
7036,
16,
1705,
529,
33,
7036,
16,
2944,
33,
8381,
4672,
3536,
694,
326,
460,
434,
326,
501,
733,
1269,
635,
326,
225,
864,
589,
16,
1... |
res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value'] gLogger.debug("SRM2Storage.releaseFile: Attempting to release %s file(s)." % len(urls)) resDict = self.__gfal_release_wrapper(urls)['Value'] | res = self.checkArgumentFormat( path ) if not res['OK']: return res urls = res['Value'] gLogger.debug( "SRM2Storage.releaseFile: Attempting to release %s file(s)." % len( urls ) ) resDict = self.__gfal_release_wrapper( urls )['Value'] | def releaseFile(self,path): """ Release a file """ res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value'] | 70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3992,
812,
12,
2890,
16,
803,
4672,
3536,
10819,
279,
585,
3536,
400,
273,
365,
18,
1893,
1379,
1630,
12,
803,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
6903,
273,
400,
3292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3992,
812,
12,
2890,
16,
803,
4672,
3536,
10819,
279,
585,
3536,
400,
273,
365,
18,
1893,
1379,
1630,
12,
803,
13,
309,
486,
400,
3292,
3141,
3546,
30,
327,
400,
6903,
273,
400,
3292,
... |
[+1.0/3**0.5, +1.0/3**0.5, -1.0/3**0.5], | def __init__(self): """ Setup hex8 cell. """ vertices = numpy.array([[-1.0, -1.0, -1.0], [+1.0, -1.0, -1.0], [-1.0, +1.0, -1.0], [+1.0, +1.0, -1.0], [-1.0, -1.0, +1.0], [+1.0, -1.0, +1.0], [-1.0, +1.0, +1.0], [+1.0, +1.0, +1.0]]) quadPts = numpy.array([ [-1.0/3**0.5, -1.0/3**0.5, -1.0/3**0.5], [+1.0/3**0.5, -1.0/3**0.5, -1.0/3**0.5], [-1.0/3**0.5, +1.0/3**0.5, -1.0/3**0.5], [+1.0/3**0.5, +1.0/3**0.5, -1.0/3**0.5], [-1.0/3**0.5, -1.0/3**0.5, +1.0/3**0.5], [+1.0/3**0.5, -1.0/3**0.5, +1.0/3**0.5], [-1.0/3**0.5, +1.0/3**0.5, +1.0/3**0.5], [+1.0/3**0.5, +1.0/3**0.5, +1.0/3**0.5]]) quadWts = numpy.array( [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]) | fe068c7d5a9a7a2245d29d05c23d7dc62cec27ce /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8645/fe068c7d5a9a7a2245d29d05c23d7dc62cec27ce/TestFIATLagrange.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
10939,
3827,
28,
2484,
18,
3536,
6928,
273,
3972,
18,
1126,
3816,
18919,
21,
18,
20,
16,
300,
21,
18,
20,
16,
300,
21,
18,
20,
6487,
306,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
10939,
3827,
28,
2484,
18,
3536,
6928,
273,
3972,
18,
1126,
3816,
18919,
21,
18,
20,
16,
300,
21,
18,
20,
16,
300,
21,
18,
20,
6487,
306,
15,
... | |
type, abbr, key.split(keysep)[2], | type, key.split(keysep)[2], state, | def getPlaceJSON( places, key, state, type ): place = places[key] if not place: return '' bounds = place['bounds'] center = place['center'] centroid = place['centroid'] if type == "state": abbr = '"abbr":"%s",' % state else: abbr = '' return '{"type":"Feature","bbox":[%.4f,%.4f,%.4f,%.4f],"properties":{"kind":"%s",%s"name":"%s","center":[%.4f,%.4f],"centroid":[%.4f,%.4f]},"geometry":{"type":"MultiPolygon","coordinates":[%s]}}' %( bounds[0][0], bounds[0][1], bounds[1][0], bounds[1][1], type, abbr, key.split(keysep)[2], center[0], center[1], centroid[0], centroid[1], ','.join(place['shapes']) ) | 26652bfd26e935f8f0ac98ebadfee980d881c5c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11848/26652bfd26e935f8f0ac98ebadfee980d881c5c9/makeshapes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9774,
623,
2986,
12,
12576,
16,
498,
16,
919,
16,
618,
262,
30,
3166,
273,
12576,
63,
856,
65,
309,
486,
3166,
30,
327,
875,
4972,
273,
3166,
3292,
10576,
3546,
4617,
273,
3166,
3292,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9774,
623,
2986,
12,
12576,
16,
498,
16,
919,
16,
618,
262,
30,
3166,
273,
12576,
63,
856,
65,
309,
486,
3166,
30,
327,
875,
4972,
273,
3166,
3292,
10576,
3546,
4617,
273,
3166,
3292,
... |
print " PAS present. user is:", user.__class__ | def setMemberProperties(self, mapping, force_local = 0): # Sets the properties given in the MemberDataTool. tool = self.getTool() print "setMemberProperties" # we could pay attention to force_local here... if IPluggableAuthService.isImplementedBy(self.acl_users): user = self.getUser() sheets = getattr(user, 'getOrderedPropertySheets', lambda: None)() print " PAS present. user is:", user.__class__ # we won't always have PlonePAS users, due to acquisition, nor are guaranteed property sheets if sheets: print " sheets present" # -- # xxx track values set to defer to default impl # property routing for k,v in mapping.items(): for sheet in sheets: print " looking at", k, "=", v, "on", sheet #import pdb; pdb.set_trace() if sheet.hasProperty(k): print ' hasProperty', k, 'sheet', sheet if IMutablePropertySheet.isImplementedBy(sheet): sheet.setProperty( k, v ) print " Set", k, v, sheet else: raise RuntimeError("mutable property provider shadowed by read only provider") self.notifyModified() return print " PAS fails, using MemberData" # defer to base impl in absence of PAS, a PAS user, or property sheets return BaseMemberData.setMemberProperties(self, mapping, force_local) | 90f3ba5c455c21bca62a60a26a661ef024c55991 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12230/90f3ba5c455c21bca62a60a26a661ef024c55991/memberdata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
4419,
2297,
12,
2890,
16,
2874,
16,
2944,
67,
3729,
273,
374,
4672,
468,
11511,
326,
1790,
864,
316,
326,
8596,
751,
6364,
18,
5226,
273,
365,
18,
588,
6364,
1435,
1172,
315,
542,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4419,
2297,
12,
2890,
16,
2874,
16,
2944,
67,
3729,
273,
374,
4672,
468,
11511,
326,
1790,
864,
316,
326,
8596,
751,
6364,
18,
5226,
273,
365,
18,
588,
6364,
1435,
1172,
315,
542,... | |
return [self.get_task(id) for id in self.get_task_ids()] | return self.get_tasks_filtered(['all']) | def get_tasks(self): # Retrieve a list of task data dicts return [self.get_task(id) for id in self.get_task_ids()] | 3b56c1efd797a6f7c9b6ff86740418a4df901d7d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/3b56c1efd797a6f7c9b6ff86740418a4df901d7d/dbuswrapper.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9416,
12,
2890,
4672,
468,
10708,
279,
666,
434,
1562,
501,
15838,
327,
306,
2890,
18,
588,
67,
4146,
12,
350,
13,
364,
612,
316,
365,
18,
588,
67,
4146,
67,
2232,
1435,
65,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9416,
12,
2890,
4672,
468,
10708,
279,
666,
434,
1562,
501,
15838,
327,
306,
2890,
18,
588,
67,
4146,
12,
350,
13,
364,
612,
316,
365,
18,
588,
67,
4146,
67,
2232,
1435,
65,... |
if callable(template): filter = template else: template = _compile_repl(template, pattern) if not template[0] and len(template[1]) == 1: filter = template[1][0] else: def filter(match, template=template): return sre_parse.expand_template(template, match) | template = _compile_repl(template, pattern) if not template[0] and len(template[1]) == 1: return template[1][0] def filter(match, template=template): return sre_parse.expand_template(template, match) | def _subx(pattern, template): # internal: pattern.sub/subn implementation helper if callable(template): filter = template else: template = _compile_repl(template, pattern) if not template[0] and len(template[1]) == 1: # literal replacement filter = template[1][0] else: def filter(match, template=template): return sre_parse.expand_template(template, match) return filter | 05298c0952690c720c4a22c32104e94b9fba7a7c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/05298c0952690c720c4a22c32104e94b9fba7a7c/sre.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1717,
92,
12,
4951,
16,
1542,
4672,
468,
2713,
30,
1936,
18,
1717,
19,
1717,
82,
4471,
4222,
309,
4140,
12,
3202,
4672,
1034,
273,
1542,
469,
30,
1542,
273,
389,
11100,
67,
26745,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
1717,
92,
12,
4951,
16,
1542,
4672,
468,
2713,
30,
1936,
18,
1717,
19,
1717,
82,
4471,
4222,
309,
4140,
12,
3202,
4672,
1034,
273,
1542,
469,
30,
1542,
273,
389,
11100,
67,
26745,... |
if k > 0: v = concatenate((zeros(k, v.dtype),v)) elif k < 0: v = concatenate((v,zeros(-k, v.dtype))) return eye(n, k=k)*v | res = zeros((n,n), v.dtype) i = arange(0,n-k) if (k>=0): fi = i+k+i*n else: fi = i+(i-k)*n res.flat[fi] = v return res | def diag(v, k=0): """ returns the k-th diagonal if v is a array or returns a array with v as the k-th diagonal if v is a vector. """ v = asarray(v) s = v.shape if len(s)==1: n = s[0]+abs(k) if k > 0: v = concatenate((zeros(k, v.dtype),v)) elif k < 0: v = concatenate((v,zeros(-k, v.dtype))) return eye(n, k=k)*v elif len(s)==2: v = add.reduce(eye(s[0], s[1], k=k)*v) if k > 0: return v[k:] elif k < 0: return v[:k] else: return v else: raise ValueError, "Input must be 1- or 2-d." | 07a2484e565aeb05a93b0b716160524b42032ab5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/07a2484e565aeb05a93b0b716160524b42032ab5/twodim_base.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6643,
12,
90,
16,
417,
33,
20,
4672,
3536,
1135,
326,
417,
17,
451,
15425,
309,
331,
353,
279,
526,
578,
1135,
279,
526,
598,
331,
487,
326,
417,
17,
451,
15425,
309,
331,
353,
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,
6643,
12,
90,
16,
417,
33,
20,
4672,
3536,
1135,
326,
417,
17,
451,
15425,
309,
331,
353,
279,
526,
578,
1135,
279,
526,
598,
331,
487,
326,
417,
17,
451,
15425,
309,
331,
353,
279,
... |
data = cPickle.dumps(value, self.binary) return self.db.append(data, txn) | if self.get_type() != db.DB_RECNO: self.append = self.__append return self.append(value, txn=txn) raise db.DBError, "append() only supported when dbshelve opened with filetype=dbshelve.db.DB_RECNO" | def append(self, value, txn=None): data = cPickle.dumps(value, self.binary) return self.db.append(data, txn) | f2d2bffa9cf1a7de105151ce0243ac605e5e61b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/f2d2bffa9cf1a7de105151ce0243ac605e5e61b1/dbshelve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
12,
2890,
16,
460,
16,
7827,
33,
7036,
4672,
501,
273,
276,
17968,
298,
18,
13302,
1121,
12,
1132,
16,
365,
18,
8578,
13,
327,
365,
18,
1966,
18,
6923,
12,
892,
16,
7827,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
460,
16,
7827,
33,
7036,
4672,
501,
273,
276,
17968,
298,
18,
13302,
1121,
12,
1132,
16,
365,
18,
8578,
13,
327,
365,
18,
1966,
18,
6923,
12,
892,
16,
7827,
13,
... |
resources=[] | resources = [] | def info_resources(self,k,v): if not v: return None resources=[] for r in v.keys(): p=v[r].get("presence") if p is None or (p.get_type() and p.get_type()!="available"): continue | ed2720a863a0afcf460f4a25be432bee15507f8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12768/ed2720a863a0afcf460f4a25be432bee15507f8c/presence.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
67,
4683,
12,
2890,
16,
79,
16,
90,
4672,
309,
486,
331,
30,
327,
599,
2703,
273,
5378,
364,
436,
316,
331,
18,
2452,
13332,
293,
33,
90,
63,
86,
8009,
588,
2932,
21731,
7923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1123,
67,
4683,
12,
2890,
16,
79,
16,
90,
4672,
309,
486,
331,
30,
327,
599,
2703,
273,
5378,
364,
436,
316,
331,
18,
2452,
13332,
293,
33,
90,
63,
86,
8009,
588,
2932,
21731,
7923,
... |
raise KeyError('The config does not have an instance [%s] defined' \ % self.instance) | raise KeyError('The config does not have a section named [%s] ' 'for the instance %r' % (i, i)) | def __init__(self, conffile='/etc/mirrorbrain.conf', instance=None): | 5bc0dc29dd110d8715b8ccf5ca906f7261fee6c6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3890/5bc0dc29dd110d8715b8ccf5ca906f7261fee6c6/conf.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2195,
768,
2218,
19,
14175,
19,
27197,
70,
7596,
18,
3923,
2187,
791,
33,
7036,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2195,
768,
2218,
19,
14175,
19,
27197,
70,
7596,
18,
3923,
2187,
791,
33,
7036,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
L[fromstr[i]] = tostr[i] | L[fromstr[i]] = tostr[i] | def maketrans(fromstr, tostr): """maketrans(frm, to) -> string Return a translation table (a string of 256 bytes long) suitable for use in string.translate. The strings frm and to must be of the same length. """ if len(fromstr) != len(tostr): raise ValueError, "maketrans arguments must have same length" global _idmapL if not _idmapL: _idmapL = map(None, _idmap) L = _idmapL[:] fromstr = map(ord, fromstr) for i in range(len(fromstr)): L[fromstr[i]] = tostr[i] return joinfields(L, "") | 857c4c36b962c6e74559e045c7fb43177dd5bcea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/857c4c36b962c6e74559e045c7fb43177dd5bcea/string.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29796,
16354,
634,
12,
2080,
701,
16,
358,
701,
4672,
3536,
81,
581,
16354,
634,
12,
4840,
81,
16,
358,
13,
317,
533,
225,
2000,
279,
4794,
1014,
261,
69,
533,
434,
8303,
1731,
1525,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29796,
16354,
634,
12,
2080,
701,
16,
358,
701,
4672,
3536,
81,
581,
16354,
634,
12,
4840,
81,
16,
358,
13,
317,
533,
225,
2000,
279,
4794,
1014,
261,
69,
533,
434,
8303,
1731,
1525,
... |
bot = UploadRobot(url, description, keepFilename) | bot = UploadRobot(url, description, keepFilename, verifyDescription) | def main(args): url = u'' description = [] keepFilename = False for arg in args: arg = wikipedia.argHandler(arg, 'upload') if arg: if arg.startswith('-keep'): keepFilename = True elif url == u'': url = arg else: description.append(arg) description = u' '.join(description) bot = UploadRobot(url, description, keepFilename) bot.run() | 318f7434b6b3ddb99f04d08d87c4e84f3c0c863b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/318f7434b6b3ddb99f04d08d87c4e84f3c0c863b/upload.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
4672,
880,
273,
582,
6309,
2477,
273,
5378,
3455,
5359,
273,
1083,
225,
364,
1501,
316,
833,
30,
1501,
273,
21137,
18,
3175,
1503,
12,
3175,
16,
296,
6327,
6134,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
12,
1968,
4672,
880,
273,
582,
6309,
2477,
273,
5378,
3455,
5359,
273,
1083,
225,
364,
1501,
316,
833,
30,
1501,
273,
21137,
18,
3175,
1503,
12,
3175,
16,
296,
6327,
6134,
309,
1... |
except Exception, e: print >> sys.stderr, "XMLRPC Error: %s" % e | except Exception, err: print >> sys.stderr, "XMLRPC Error: %s" % err | def webimport(self, cr, uid, web_ids, context={}): cnew = cupdate = cerror = 0 for website in self.pool.get('esale_joomla.web').browse(cr, uid, web_ids): server = _xmlrpc(website) try: #get languages languages = server.openerp2vm.get_languages(website.login, website.password) if website.language_id.code not in languages: print >> sys.stderr, 'Cannot match shop language' cerror += 1 continue del languages[website.language_id.code] context['lang'] = website.language_id.code #get categories categories = server.openerp2vm.get_categories(website.login, website.password) #id, country, state, rate for i in range(len(categories)): categories[i][1] = _decode(categories[i][1]) categories[i][1] = len(categories[i][1]) > 64 and categories[i][1][0:61] + '...' or categories[i][1] cats = [] for e in categories: (cid, cname, cparent) = e if not cid: cerror += 1 continue value = { 'web_id': website.id, 'esale_joomla_id': cid, u'esale_joomla_name': cname, 'state': 'imported', } id = self.search(cr, uid, [('web_id', '=', website.id), ('esale_joomla_id', '=', cid)]) if not len(id): id = self.create(cr, uid, value, context=context) cnew += 1 else: id = id[0] for (lang_name, lang_id) in languages.iteritems(): try: tr = server.openerp2vm.get_translation(website.login, website.password, lang_id, 'vm_category', 'category_name', cid) except Exception, e: print >> sys.stderr, "XMLRPC Error: %s" % e else: if tr[0]: self.write(cr, uid, id, {u'esale_joomla_name': tr[1], 'state': 'imported'}, {'lang': lang_name}) cats.append([e, id]) for (category, id) in cats: (cid, cname, cparent) = category value = { u'esale_joomla_name': cname, u'esale_joomla_parent_id': None, 'state': 'imported', } if cparent: parent_id = self.search(cr, uid, [('web_id', '=', website.id), ('esale_joomla_id', '=', cparent)]) if not len(parent_id): print >> sys.stderr, "Error while searching for parent" else: print "category %s/%s has parent %s/%s" % (id, cid, parent_id[0], cparent) value['esale_joomla_parent_id'] = parent_id[0] self.write(cr, uid, id, value, context=context) cupdate += len(cats) except (xmlrpclib.ProtocolError, xmlrpclib.ResponseError, xmlrpclib.Fault) as e: print >> sys.stderr, "XMLRPC Error: %s" % e cerror += 1 cupdate += 0 - cnew - cerror self.pool.get('esale_joomla.synclog').create(cr, uid, { 'web_id': website.id, 'object': 'category', 'type': 'export', 'errors': cerror, }) | fce79f5cd0fea4f038fdbfbcd28dc7d747ff9115 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/fce79f5cd0fea4f038fdbfbcd28dc7d747ff9115/esale_joomla.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3311,
5666,
12,
2890,
16,
4422,
16,
4555,
16,
3311,
67,
2232,
16,
819,
12938,
4672,
276,
2704,
273,
276,
2725,
273,
276,
1636,
273,
374,
364,
12504,
316,
365,
18,
6011,
18,
588,
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,
3311,
5666,
12,
2890,
16,
4422,
16,
4555,
16,
3311,
67,
2232,
16,
819,
12938,
4672,
276,
2704,
273,
276,
2725,
273,
276,
1636,
273,
374,
364,
12504,
316,
365,
18,
6011,
18,
588,
2668,
... |
annotions = IAnnotations(obj) catalog = getToolByName(obj, 'portal_catalog', None) if ANNOTATION_KEY in annotions: conversation = annotions[ANNOTATION_KEY] conversation = conversation.__of__(obj) for comment in conversation.getComments(): try: comment = comment.__of__(conversation) if catalog: catalog.indexObject(comment) except StopIteration: pass | annotions = IAnnotations(obj) catalog = getToolByName(obj, 'portal_catalog', None) if ANNOTATION_KEY in annotions: conversation = annotions[ANNOTATION_KEY] conversation = conversation.__of__(obj) for comment in conversation.getComments(): try: comment = comment.__of__(conversation) if catalog: catalog.indexObject(comment) except StopIteration: pass | def indexObject(obj, path): | 318afe5aaef07dfdcd3e56881bbba7007c6649e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12197/318afe5aaef07dfdcd3e56881bbba7007c6649e9/patches.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
921,
12,
2603,
16,
589,
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,
... | [
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
770,
921,
12,
2603,
16,
589,
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,
... |
if search_result is None: | if search_results is []: | def parse(self, castep_file): search_result = self.nmr_regex.search(castep_file) | f79d35b2373c83e7ce0d6816563610b350e77a6a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13057/f79d35b2373c83e7ce0d6816563610b350e77a6a/nmr.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
12,
2890,
16,
4812,
881,
67,
768,
4672,
1623,
67,
2088,
273,
365,
18,
15094,
86,
67,
7584,
18,
3072,
12,
4155,
881,
67,
768,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
12,
2890,
16,
4812,
881,
67,
768,
4672,
1623,
67,
2088,
273,
365,
18,
15094,
86,
67,
7584,
18,
3072,
12,
4155,
881,
67,
768,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
and f.scene_list is not None and layer not in renpy.config.overlay_layers): | and f.scene_list is not None): | def merge_slide(old, new): | 03477d1c7506797b42cc05f26550b40d7c5357f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10962/03477d1c7506797b42cc05f26550b40d7c5357f9/transition.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
67,
26371,
12,
1673,
16,
394,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2691,
67,
26371,
12,
1673,
16,
394,
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,... |
result[t[1]] = False | result[t[1]] = 0 | cont += configString('/* #undef %s */' % func[1], desc = description) | f3016d70d952f295e30601e06998d95d2867a6ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/f3016d70d952f295e30601e06998d95d2867a6ea/scons_utils.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
466,
1011,
642,
780,
2668,
20308,
468,
318,
536,
738,
87,
1195,
11,
738,
1326,
63,
21,
6487,
3044,
273,
2477,
13,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
466,
1011,
642,
780,
2668,
20308,
468,
318,
536,
738,
87,
1195,
11,
738,
1326,
63,
21,
6487,
3044,
273,
2477,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
color = gtk.gdk.color_parse(values[row][:-4]) alpha = int("0x%s" % values[row][-4:], base=16) button.set_color(color) button.set_alpha(alpha) | value = values[row] color = gtk.gdk.color_parse(value[:-4]) alpha = int("0x%s" % value[-4:], base=16) button.set_color(color) button.set_alpha(alpha) | def MatchChanged(widget, match, entry): entry.set_text(match) | 4f61a35046c6fcd2a91ae92e18abdb2059f60bda /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7062/4f61a35046c6fcd2a91ae92e18abdb2059f60bda/Settings.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4639,
5033,
12,
6587,
16,
845,
16,
1241,
4672,
1241,
18,
542,
67,
955,
12,
1916,
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,
... | [
1,
1,
1,
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,
4639,
5033,
12,
6587,
16,
845,
16,
1241,
4672,
1241,
18,
542,
67,
955,
12,
1916,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for meta,value in metaDict.items(): | for meta, value in metaDict.items(): | def findDirectoriesByMetadata(self,queryDict,credDict): """ Find Directories satisfying the given metadata """ result = self.__expandMetaDictionary(queryDict,credDict) if not result['OK']: return result metaDict = result['Value'] print "AT >>>", metaDict dirList = [] first = True for meta,value in metaDict.items(): if value == "Missing": result = self.__findSubdirMissingMeta(meta) else: result = self.__findSubdirByMeta(meta,value) if not result['OK']: return result mList = result['Value'] if first: dirList = mList first = False else: newList = [] for d in dirList: if d in mList: newList.append(d) dirList = newList dirNameList = [ ] for dir in dirList: result = self.dtree.getDirectoryPath(dir) if not result['OK']: return result dirNameList.append(result['Value']) return S_OK(dirNameList) | 127f98379e5064d0a5d5df2ba7ce74c780770faa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/127f98379e5064d0a5d5df2ba7ce74c780770faa/DirectoryMetadata.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1104,
13071,
858,
2277,
12,
2890,
16,
2271,
5014,
16,
20610,
5014,
4672,
3536,
4163,
9908,
2401,
9281,
14946,
326,
864,
1982,
3536,
563,
273,
365,
16186,
12320,
2781,
10905,
12,
2271,
5014... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13071,
858,
2277,
12,
2890,
16,
2271,
5014,
16,
20610,
5014,
4672,
3536,
4163,
9908,
2401,
9281,
14946,
326,
864,
1982,
3536,
563,
273,
365,
16186,
12320,
2781,
10905,
12,
2271,
5014... |
page = page.decode("cp1251").split("\n") return page[page.index("<LI class=\"first\">Сейчас: <b>") + 1] | lines = page.decode("cp1251").split("\n") return lines[lines.index("<LI class=\"first\">Сейчас: <b>") + 1] | def request_text(): page = urllib.request.urlopen("http://www.novgorod.ru/temperature/").read() page = page.decode("cp1251").split("\n") return page[page.index("<LI class=\"first\">Сейчас: <b>") + 1] | c8f3197208abac2da2adc638d5ecf658a2077a4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14156/c8f3197208abac2da2adc638d5ecf658a2077a4f/novgorod-temperature.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
67,
955,
13332,
1363,
273,
11527,
18,
2293,
18,
295,
18589,
2932,
2505,
2207,
5591,
18,
82,
1527,
3022,
369,
18,
8653,
19,
19557,
4898,
2934,
896,
1435,
2362,
273,
1363,
18,
3922,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
590,
67,
955,
13332,
1363,
273,
11527,
18,
2293,
18,
295,
18589,
2932,
2505,
2207,
5591,
18,
82,
1527,
3022,
369,
18,
8653,
19,
19557,
4898,
2934,
896,
1435,
2362,
273,
1363,
18,
3922,
... |
"""Scan through string looking for a match to the pattern, returning a MatchObject instance, or None if no match was found.""" | """search(string[, pos][, endpos]) -> MatchObject or None Scan through string looking for a location where this regular expression produces a match, and return a corresponding MatchObject instance. Return None if no position in the string matches the pattern; note that this is different from finding a zero-length match at some point in the string. The optional pos and endpos parameters have the same meaning as for the match() method. """ | def search(self, string, pos=0, endpos=None): """Scan through string looking for a match to the pattern, returning a MatchObject instance, or None if no match was found.""" | 6ebb387a087b1a64437856da4b286694396e663c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/6ebb387a087b1a64437856da4b286694396e663c/re.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
533,
16,
949,
33,
20,
16,
679,
917,
33,
7036,
4672,
3536,
7972,
3059,
533,
7849,
364,
279,
845,
358,
326,
1936,
16,
5785,
279,
4639,
921,
791,
16,
578,
599,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
533,
16,
949,
33,
20,
16,
679,
917,
33,
7036,
4672,
3536,
7972,
3059,
533,
7849,
364,
279,
845,
358,
326,
1936,
16,
5785,
279,
4639,
921,
791,
16,
578,
599,
309,
... |
client=[self.main.selected_ip] ip_unicast=self.main.selected_ip | str_scapes=[" ", "(", ")", "*", "!", "?", "\"", "`", "[", "]", "{", "}", ";", ":", ",", "=", "$"] client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": ip_unicast="239.255.255.0" remote_cmd="vlc udp://@%s:1234 --brightness 2 --no-x11-shm --no-xvideo-shm --disable-screensaver" %(ip_unicast) else: ip_unicast=self.main.selected_ip remote_cmd="vlc udp://@:1234 --brightness 2 --no-x11-shm --no-xvideo-shm --disable-screensaver" | def menu_event_one(self, action): start1=time() (model, iter) = self.main.tabla.get_selection().get_selected() if iter == None: print_debug( "menu_event_one() not selected thin client !!!" ) return self.main.selected_host=model.get_value(iter,COL_HOST) self.main.selected_ip=model.get_value(iter, COL_IP) if not self.doaction_onthisclient(action, self.main.selected_ip): # show a msg shared.info_msg ( _("Can't exec this action because you are connected at this host!") ) return if action == 0: # refresh terminal # call to read remote info self.main.xmlrpc.newhost(self.main.selected_ip) self.main.xmlrpc.ip=self.main.selected_ip self.main.worker=shared.Workers( self.main,\ target=self.populate_datatxt, args=([self.main.selected_ip]) ).start() if action == 1: # clean datatxtbuffer self.main.datatxt.clean() if action == 2: # Ask for reboot reboot ip=self.main.selected_ip msg=_( _("Do you want to reboot %s?" ) %(self.main.selected_ip) ) if shared.ask_msg ( msg ): self.main.xmlrpc.Exe("reboot") if action == 3: # Ask for poweroff reboot msg=_( _("Do you want to poweroff %s?" ) %(self.main.selected_ip) ) if shared.ask_msg ( msg ): self.main.xmlrpc.Exe("poweroff") if action == 4: # lock screen if not self.main.xmlrpc.lockscreen(): shared.error_msg( _("Can't connect to tcosxmlrpc.\nPlease verify user and password in prefences!") ) return self.change_lockscreen(self.main.selected_ip) if action == 5: # unlock screen if not self.main.xmlrpc.unlockscreen(): shared.error_msg( _("Can't connect to tcosxmlrpc.\nPlease verify user and password in prefences!") ) return self.change_lockscreen(self.main.selected_ip) if action == 6: # start ivs self.main.worker=shared.Workers(self.main, target=self.start_ivs, args=([self.main.selected_ip]) ) self.main.worker.start() if action == 7: # start vnc self.main.worker=shared.Workers(self.main, target=self.start_vnc, args=([self.main.selected_ip]) ) self.main.worker.start() if action == 8: # screenshot !!! self.main.worker=shared.Workers(self.main, target=self.get_screenshot, args=[self.main.selected_ip]) self.main.worker.start() if action == 9: # give a remote xterm throught SSH pass_msg=_("Enter password of remote thin client (if asked for it)") cmd="xterm -e \"echo '%s'; ssh root@%s\"" %(pass_msg, self.main.selected_ip) print_debug ( "menu_event_one(%d) cmd=%s" %(action, cmd) ) th=self.main.exe_cmd( cmd ) if action == 10: # launch personalize settings if client is TCOS (PXES and LTSP not supported) client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": cmd="gksu \"tcospersonalize --host=%s\"" %(self.main.selected_ip) print_debug ( "menu_event_one(%d) cmd=%s" %(action, cmd) ) th=self.main.exe_cmd( cmd ) else: shared.info_msg( _("%s is not supported to personalize!") %(client_type) ) if action == 11: # reset xorg # Ask for it if not self.main.localdata.IsLogged(self.main.selected_ip): shared.error_msg ( _("Can't logout, user is not logged") ) return user=self.main.localdata.GetUsernameAndHost(self.main.selected_ip) print_debug("menu_event_one() user=%s" %user) msg=_( _("Do you want to logout user \"%s\"?" ) %(user) ) if shared.ask_msg ( msg ): newusernames=[] remote_cmd="/usr/lib/tcos/session-cmd-send LOGOUT" if user.find(":") != -1: # we have a standalone user... usern, ip = user.split(":") self.main.xmlrpc.newhost(ip) self.main.xmlrpc.DBus("exec", remote_cmd ) else: newusernames.append(user) result = self.main.dbus_action.do_exec(newusernames ,remote_cmd ) if not result: shared.error_msg ( _("Error while exec remote app:\nReason:%s") %( self.main.dbus_action.get_error_msg() ) ) if action == 12: # restart xorg with new settings # thin client must download again XXX.XXX.XXX.XXX.conf and rebuild xorg.conf client_type = self.main.xmlrpc.ReadInfo("get_client") if client_type == "tcos": msg=_( "Restart X session of %s with new config?" ) %(self.main.selected_ip) if shared.ask_msg ( msg ): # see xmlrpc/xorg.h, rebuild will download and sed xorg.conf.tpl self.main.xmlrpc.tc.tcos.xorg("rebuild", "--restartxorg", \ self.main.xmlrpc.username, \ self.main.xmlrpc.password ) self.refresh_client_info(self.main.selected_ip) else: shared.info_msg( _("%s is not supported to restart Xorg!") %(client_type) ) if action == 13: # exec app self.askfor(mode="exec", users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)]) if action == 14: # send message self.askfor(mode="mess", users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)] ) if action == 15: print_debug ("menu_event_one() show running apps" ) self.get_user_processes(self.main.selected_ip) if action == 16: # action sent by vidal_joshur at gva dot es # start video broadcast mode # search for connected users # Stream to single client unicast users=[self.main.localdata.GetUsernameAndHost(self.main.selected_ip)] client=[self.main.selected_ip] ip_unicast=self.main.selected_ip dialog = gtk.FileChooserDialog(_("Select audio/video file.."), None, gtk.FILE_CHOOSER_ACTION_OPEN, (_("Play DVD"), 1, _("Play SVCD/VCD"), 2, _("Play AudioCD"), 3, gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) dialog.set_default_response(gtk.RESPONSE_OK) self.folder = self._folder = os.environ['HOME'] dialog.set_current_folder(self.folder) filter = gtk.FileFilter() filter.set_name("Media Files ( *.avi, *.mpg, *.mpeg, *.mp3, *.wav, etc.. )") file_types=["*.avi", "*.mpg", "*.mpeg", "*.ogg", "*.ogm", "*.asf", "*.divx", "*.wmv", "*.vob", "*.m2v", "*.m4v", "*.mp2", "*.mp4", "*.ac3", "*.ogg", "*.mp1", "*.mp2", "*.mp3", "*.wav", "*.wma"] for elem in file_types: filter.add_pattern( elem ) dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name("All Files") filter.add_pattern("*.*") dialog.add_filter(filter) | 02aa26e9decb17b7531b02e8a9add63d01cedfb3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13520/02aa26e9decb17b7531b02e8a9add63d01cedfb3/TcosActions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3824,
67,
2575,
67,
476,
12,
2890,
16,
1301,
4672,
787,
21,
33,
957,
1435,
261,
2284,
16,
1400,
13,
273,
365,
18,
5254,
18,
7032,
11821,
18,
588,
67,
10705,
7675,
588,
67,
8109,
1435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3824,
67,
2575,
67,
476,
12,
2890,
16,
1301,
4672,
787,
21,
33,
957,
1435,
261,
2284,
16,
1400,
13,
273,
365,
18,
5254,
18,
7032,
11821,
18,
588,
67,
10705,
7675,
588,
67,
8109,
1435... |
raise SyntaxError, "Expected non-blank line, but got a blank one" apply(method, (line,)) def attempt_read_and_call(uhandle, method, **keywds): """attempt_read_and_call(uhandle, method, **keywds) -> boolean Similar to read_and_call, but returns a boolean specifying whether the line has passed the checks. Does not raise exceptions. See docs for read_and_call for a description of the function arguments. """ line = uhandle.peekline() try: apply(read_and_call, (uhandle, method), keywds) except SyntaxError: try: tb = sys.exc_info()[2] if len(traceback.extract_tb(tb)) > 2: raise finally: del tb uhandle.saveline(line) return 0 return 1 | return "Expected non-blank line, but got a blank one" return None | def read_and_call(uhandle, method, start=None, end=None, contains=None, blank=None): """_read_and_call(uhandle, method, start=None, end=None, contains=None, blank=None) Read a line from uhandle, check it, and pass it to the method. Raises a SyntaxError if the line does not pass the checks. start, end, contains, and blank specify optional conditions that the line must pass. start and end specifies what the line must begin or end with (not counting EOL characters). contains specifies a substring that must be found in the line. If blank is a true value, then the line must be blank. Set these parameters to None if the check is not necessary. """ line = uhandle.readline() if not line: raise SyntaxError, "Unexpected end of stream." if start: if line[:len(start)] != start: raise SyntaxError, "Line does not start with '%s': %s" % \ (start, line) if end: if string.rstrip(line)[-len(end):] != end: raise SyntaxError, "Line does not end with '%s': %s" % \ (end, line) if contains: if string.find(line, contains) == -1: raise SyntaxError, "Line does not contain '%s': %s" % \ (contains, line) if blank is not None: if blank: if not is_blank_line(line): raise SyntaxError, "Expected blank line, but got: %s" % \ line else: if is_blank_line(line): raise SyntaxError, "Expected non-blank line, but got a blank one" apply(method, (line,)) | 0160981149952443bdfea063f28d8466c392478a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/0160981149952443bdfea063f28d8466c392478a/ParserSupport.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
464,
67,
1991,
12,
89,
4110,
16,
707,
16,
787,
33,
7036,
16,
679,
33,
7036,
16,
1914,
33,
7036,
16,
7052,
33,
7036,
4672,
3536,
67,
896,
67,
464,
67,
1991,
12,
89,
4110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
464,
67,
1991,
12,
89,
4110,
16,
707,
16,
787,
33,
7036,
16,
679,
33,
7036,
16,
1914,
33,
7036,
16,
7052,
33,
7036,
4672,
3536,
67,
896,
67,
464,
67,
1991,
12,
89,
4110,
... |
@param show_warnings: Whether or not to display warnings generated by parsing C{str}. | @param show_warnings: Whether or not to display non-fatal errors generated by parsing C{str}. | def pparse(str, show_warnings=1, show_errors=1, stream=sys.stderr): """ Pretty-parse the string. This parses the string, and catches any warnings or errors produced. Any warnings and errors are displayed, and the resulting DOM parse structure is returned. @param str: The string to parse. @type str: C{string} @param show_warnings: Whether or not to display warnings generated by parsing C{str}. @type show_warnings: C{boolean} @param show_errors: Whether or not to display errors generated by parsing C{str}. @type show_errors: C{boolean} @param stream: The stream that warnings and errors should be written to. @type stream: C{stream} @return: a DOM document encoding the contents of C{str}. @rtype: L{xml.dom.minidom.Document} @raise SyntaxError: If any fatal errors were encountered. """ errors = [] warnings = [] confused = 0 try: val = parse(str, errors, warnings) except: confused = 1 if not show_warnings: warnings = [] warnings.sort() errors.sort() if warnings: print >>stream, '='*SCRWIDTH print >>stream, "WARNINGS" print >>stream, '-'*SCRWIDTH for warning in warnings: print >>stream, warning.as_warning() print >>stream, '='*SCRWIDTH if errors and show_errors: if not warnings: print >>stream, '='*SCRWIDTH print >>stream, "ERRORS" print >>stream, '-'*SCRWIDTH for error in errors: print >>stream, error print >>stream, '='*SCRWIDTH if confused: raise elif errors: raise SyntaxError('Encountered Errors') else: return val | 7bf7c136593a0f12e906094a55f7b8f591c5abaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7bf7c136593a0f12e906094a55f7b8f591c5abaf/epytext.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
293,
2670,
12,
701,
16,
2405,
67,
12103,
33,
21,
16,
2405,
67,
4324,
33,
21,
16,
1407,
33,
9499,
18,
11241,
4672,
3536,
22328,
17,
2670,
326,
533,
18,
225,
1220,
8940,
326,
533,
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,
293,
2670,
12,
701,
16,
2405,
67,
12103,
33,
21,
16,
2405,
67,
4324,
33,
21,
16,
1407,
33,
9499,
18,
11241,
4672,
3536,
22328,
17,
2670,
326,
533,
18,
225,
1220,
8940,
326,
533,
16,
... |
if not cAlphaViewer.loaded: cAlphaViewer.loaded = True cAlphaViewer.emitModelLoaded() | if not self.CalphaViewer.loaded: self.CalphaViewer.loaded = True self.CalphaViewer.emitModelLoaded() | def helixCreateCAhelix(self): print 'In helixCreateCAhelix' cAlphaViewer = self.app.viewers['calpha'] startIndex = self.helixNtermSpinBox.value() stopIndex = self.helixCtermSpinBox.value() observedHelix = self.currentMatch.observed direction = self.currentMatch.direction #Forward=0, Reverse=1 predHelix = self.currentMatch.predicted if observedHelix.__class__.__name__ != 'ObservedHelix': raise TypeError, observedHelix.__class__.__name__ helix = Helix(self.currentChainModel, predHelix.serialNo, predHelix.label, startIndex, stopIndex) self.currentChainModel.addHelix(predHelix.serialNo, helix) moveStart = 1.5*(startIndex - predHelix.startIndex) print 'moveStart', moveStart moveEnd = 1.5*(stopIndex - predHelix.stopIndex) print 'moveEnd', moveEnd midpoint = observedHelix.getMidpoint() unitVector = observedHelix.getUnitVector() print 'unitVector', unitVector structPredCoord1 = snum.vectorAdd( midpoint, snum.scalarTimesVector(-1*predHelix.getAngstromLength()/2, unitVector) ) structPredCoord2 = snum.vectorAdd( midpoint, snum.scalarTimesVector(predHelix.getAngstromLength()/2, unitVector) ) if direction == 0: startMoveVector = snum.scalarTimesVector( moveStart, unitVector) endMoveVector = snum.scalarTimesVector( moveEnd, unitVector) coord1 = snum.vectorAdd(structPredCoord1, startMoveVector) coord2 = snum.vectorAdd(structPredCoord2, endMoveVector) helix.setAxisPoints(coord1, coord2) elif direction == 1: startMoveVector = snum.scalarTimesVector( -1*moveStart, unitVector) endMoveVector = snum.scalarTimesVector( -1*moveEnd, unitVector) coord1 = snum.vectorAdd(structPredCoord1, endMoveVector) coord2 = snum.vectorAdd(structPredCoord2, startMoveVector) helix.setAxisPoints(coord1, coord2) helixCoordList = helixEndpointsToCAlphaPositions(coord1, coord2) print helixCoordList ''' #To see the ends of the helical axis as green and red atoms startAtom = PDBAtom('AAAA', 'A', 100000, 'CA') startAtom.setPosition(Vector3DFloat(*coord1)) startAtom.setColor(0, 1, 0, 1) startAtom = cAlphaViewer.renderer.addAtom(startAtom) stopAtom = startAtom = PDBAtom('AAAA', 'A', 100001, 'CA') stopAtom.setPosition(Vector3DFloat(*coord2)) stopAtom.setColor(1, 0, 0, 1) stopAtom = cAlphaViewer.renderer.addAtom(stopAtom) ''' for i in range(len(helixCoordList)): pos = helixCoordList[i] residue = self.currentChainModel[startIndex+i] rawAtom = residue.addAtom('CA', pos[0], pos[1], pos[2], 'C') atom = cAlphaViewer.renderer.addAtom(rawAtom) residue.addAtomObject(atom) atom.setSelected(True) if i != 0: prevAtom = self.currentChainModel[startIndex+i-1].getAtom('CA') bond = PDBBond() bond.setAtom0Ix(prevAtom.getHashKey()) bond.setAtom1Ix(atom.getHashKey()) cAlphaViewer.renderer.addBond(bond) self.currentChainModel.setSelection(newSelection = range(helix.startIndex, 1+helix.stopIndex)) print helix if not cAlphaViewer.loaded: cAlphaViewer.loaded = True cAlphaViewer.emitModelLoaded() else: cAlphaViewer.emitModelChanged() | 9fefa88d897047cb33ba1b9c7ca873fe31bb572c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4399/9fefa88d897047cb33ba1b9c7ca873fe31bb572c/structure_editor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13150,
697,
1684,
3587,
76,
26342,
12,
2890,
4672,
1172,
296,
382,
13150,
697,
1684,
3587,
76,
26342,
11,
276,
9690,
18415,
273,
365,
18,
2910,
18,
1945,
414,
3292,
771,
2762,
3546,
1058... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13150,
697,
1684,
3587,
76,
26342,
12,
2890,
4672,
1172,
296,
382,
13150,
697,
1684,
3587,
76,
26342,
11,
276,
9690,
18415,
273,
365,
18,
2910,
18,
1945,
414,
3292,
771,
2762,
3546,
1058... |
self.content.append(self.__class__.TextTag( | self.content.append(self.__class__.TextTag( | def char_button(self, tag, stream): self.content.append(self.__class__.TextTag( 'CharButton', attrs={'refobj':tag.dword})) | ba816d3efc046d3a5b6ebcb2c44b09903d438cb6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/ba816d3efc046d3a5b6ebcb2c44b09903d438cb6/objects.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1149,
67,
5391,
12,
2890,
16,
1047,
16,
1407,
4672,
365,
18,
1745,
18,
6923,
12,
2890,
16186,
1106,
25648,
1528,
1805,
12,
296,
2156,
3616,
2187,
3422,
5899,
11,
266,
27936,
4278,
2692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1149,
67,
5391,
12,
2890,
16,
1047,
16,
1407,
4672,
365,
18,
1745,
18,
6923,
12,
2890,
16186,
1106,
25648,
1528,
1805,
12,
296,
2156,
3616,
2187,
3422,
5899,
11,
266,
27936,
4278,
2692,
... |
rows = len(docstring) + 1 | rows = len(docstring) - 3 self.list_win.resize(rows + 2, max_w) | def lsize(): wl = max(len(i) for i in v_items) + 1 if not wl: wl = 1 cols = ((max_w - 2) / wl) or 1 rows = len(v_items) / cols | 8e0bb3b98dcd60b7daae03397ade85e4d05a2d90 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6932/8e0bb3b98dcd60b7daae03397ade85e4d05a2d90/cli.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
328,
1467,
13332,
19564,
273,
943,
12,
1897,
12,
77,
13,
364,
277,
316,
331,
67,
3319,
13,
397,
404,
309,
486,
19564,
30,
19564,
273,
404,
5347,
273,
14015,
1896,
67,
91,
300,
576,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
328,
1467,
13332,
19564,
273,
943,
12,
1897,
12,
77,
13,
364,
277,
316,
331,
67,
3319,
13,
397,
404,
309,
486,
19564,
30,
19564,
273,
404,
5347,
273,
14015,
1896,
67,
91,
300,
576,
1... |
if s[-1] == "\n": | if s[-1:] == "\n": | def formatException(self, ei): """ Format and return the specified exception information as a string. | d027e1ad5dda2cdf66509d03684bfdece51f2885 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/d027e1ad5dda2cdf66509d03684bfdece51f2885/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
503,
12,
2890,
16,
13247,
4672,
3536,
4077,
471,
327,
326,
1269,
1520,
1779,
487,
279,
533,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
503,
12,
2890,
16,
13247,
4672,
3536,
4077,
471,
327,
326,
1269,
1520,
1779,
487,
279,
533,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self._cont_handler = handler.ContentHandler() self._err_handler = handler.ErrorHandler() | self._cont_handler = handler.ContentHandler() self._err_handler = handler.ErrorHandler() | def __init__(self): | f9059ebede7acc7d498d0703dd97adede37c5016 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f9059ebede7acc7d498d0703dd97adede37c5016/xmlreader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.failureException, '^Exception not raised$', | self.failureException, '^Exception not raised by <lambda>$', | def testAssertNotRaisesRegexp(self): self.assertRaisesRegexp( self.failureException, '^Exception not raised$', self.assertRaisesRegexp, Exception, re.compile('x'), lambda: None) self.assertRaisesRegexp( self.failureException, '^Exception not raised$', self.assertRaisesRegexp, Exception, 'x', lambda: None) | 543d06d340294603053387dfca31c840fd4b726b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/543d06d340294603053387dfca31c840fd4b726b/test_unittest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
8213,
1248,
12649,
6141,
14621,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
14621,
12,
365,
18,
12251,
503,
16,
10731,
503,
486,
11531,
635,
411,
14661,
16200,
2187,
365,
18,
11231,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8213,
1248,
12649,
6141,
14621,
12,
2890,
4672,
365,
18,
11231,
12649,
6141,
14621,
12,
365,
18,
12251,
503,
16,
10731,
503,
486,
11531,
635,
411,
14661,
16200,
2187,
365,
18,
11231,... |
def main(): import sys | import sys | def main(): import sys from optparse import OptionParser parser = OptionParser( usage="usage: %prog [options] SCRIPT-TO-RUN [SCRIPT-ARGUMENTS]") parser.disable_interspersed_args() options, args = parser.parse_args() if len(args) < 1: parser.print_help() sys.exit(2) mainpyfile = args[0] from os.path import exists if not exists(mainpyfile): print 'Error:', mainpyfile, 'does not exist' sys.exit(1) sys.argv = args execfile(mainpyfile) | 4ef8ed7b68588e31285f047f74bcaa6c444c03d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12870/4ef8ed7b68588e31285f047f74bcaa6c444c03d7/debug.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1930,
2589,
225,
628,
2153,
2670,
1930,
18862,
2082,
273,
18862,
12,
4084,
1546,
9167,
30,
738,
14654,
306,
2116,
65,
22812,
17,
4296,
17,
15238,
306,
10885,
17,
18311,
55,
4279,
13,
225,
2082... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1930,
2589,
225,
628,
2153,
2670,
1930,
18862,
2082,
273,
18862,
12,
4084,
1546,
9167,
30,
738,
14654,
306,
2116,
65,
22812,
17,
4296,
17,
15238,
306,
10885,
17,
18311,
55,
4279,
13,
225,
2082... |
return v['Value'] | return v.get('Value') | def unpack(v): return v['Value'] | 359518734da848e5cd606c78fb94254eb1789776 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6195/359518734da848e5cd606c78fb94254eb1789776/XendAPI.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6167,
12,
90,
4672,
327,
331,
3292,
620,
3546,
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,
6167,
12,
90,
4672,
327,
331,
3292,
620,
3546,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
""" Adds a macro to macroMap. Parameters ---------- - macro : 'Macro' | """addMacro(macro:Macro) -> None Adds a macro to macroMap. | def addMacro(self, macro): """ Adds a macro to macroMap. Parameters ---------- | 0d08a982cb8d26e26f2e6ab32b89ef18e54df8fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6341/0d08a982cb8d26e26f2e6ab32b89ef18e54df8fb/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
17392,
12,
2890,
16,
11522,
4672,
3536,
15605,
279,
11522,
358,
11522,
863,
18,
7012,
12181,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
527,
17392,
12,
2890,
16,
11522,
4672,
3536,
15605,
279,
11522,
358,
11522,
863,
18,
7012,
12181,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
print map_ideal | def change_ring(self, k): """ Project self onto $k$ | b7b15ea5aa6d3beb66ad165ecffbe79c7d7a3e15 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b7b15ea5aa6d3beb66ad165ecffbe79c7d7a3e15/mpolynomialsystem.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2549,
67,
8022,
12,
2890,
16,
417,
4672,
3536,
5420,
365,
10170,
271,
79,
8,
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,
2549,
67,
8022,
12,
2890,
16,
417,
4672,
3536,
5420,
365,
10170,
271,
79,
8,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
values="'PENDING'" fields="status" | values="'PENDING', '"+genpasswd()+"'" fields="status, password" | def genpasswd(): newpasswd="" chars = string.letters + string.digits for i in range(8): newpasswd = newpasswd + choice(chars) return newpasswd | 2a4a64081f8e6732dfc102527a676e9862fef9da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11083/2a4a64081f8e6732dfc102527a676e9862fef9da/eressea-register.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
24002,
13332,
394,
24002,
1546,
6,
5230,
273,
533,
18,
26054,
397,
533,
18,
16649,
364,
277,
316,
1048,
12,
28,
4672,
394,
24002,
273,
394,
24002,
397,
6023,
12,
7549,
13,
327,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3157,
24002,
13332,
394,
24002,
1546,
6,
5230,
273,
533,
18,
26054,
397,
533,
18,
16649,
364,
277,
316,
1048,
12,
28,
4672,
394,
24002,
273,
394,
24002,
397,
6023,
12,
7549,
13,
327,
3... |
for idx, col in zip(range(len(rows)), cols): | for idx, col in zip(range(len(cols)), cols): | def setGrowables(self, rows, cols): self.textConstrLst = [] for idx, row in zip(range(len(rows)), rows): if row: self._appendItem('AddGrowableRow', idx) for idx, col in zip(range(len(rows)), cols): if col: self._appendItem('AddGrowableCol', idx) | ac267a46ca026a6d87fc803f1cb714088202574d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ac267a46ca026a6d87fc803f1cb714088202574d/SizerCompanions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26770,
492,
1538,
12,
2890,
16,
2595,
16,
5347,
4672,
365,
18,
955,
442,
701,
28134,
273,
5378,
364,
2067,
16,
1027,
316,
3144,
12,
3676,
12,
1897,
12,
3870,
13,
3631,
2595,
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,
26770,
492,
1538,
12,
2890,
16,
2595,
16,
5347,
4672,
365,
18,
955,
442,
701,
28134,
273,
5378,
364,
2067,
16,
1027,
316,
3144,
12,
3676,
12,
1897,
12,
3870,
13,
3631,
2595,
4672,
309,... |
machine['os_vers'] = output.rstrip("\n") | machine['os_vers'] = munkicommon.padVersionString(output.rstrip("\n"),3) | def getMachineFacts(): global machine machine['arch'] = os.uname()[4] cmd = ['/usr/bin/sw_vers', '-productVersion'] p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (output, err) = p.communicate() machine['os_vers'] = output.rstrip("\n") | 99efc6ed017629698256e9991b97f80a9e942941 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6241/99efc6ed017629698256e9991b97f80a9e942941/updatecheck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2108,
3093,
9766,
87,
13332,
2552,
5228,
225,
5228,
3292,
991,
3546,
273,
1140,
18,
318,
339,
1435,
63,
24,
65,
1797,
273,
10228,
19,
13640,
19,
4757,
19,
5328,
67,
2496,
2187,
2400,
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,
2108,
3093,
9766,
87,
13332,
2552,
5228,
225,
5228,
3292,
991,
3546,
273,
1140,
18,
318,
339,
1435,
63,
24,
65,
1797,
273,
10228,
19,
13640,
19,
4757,
19,
5328,
67,
2496,
2187,
2400,
5... |
output.write(" value='%s'" % info[0]); | try: val = eval(info[0]) except: val = info[0] output.write(" value='%s'" % (val)); | def serialize_enum(self, output, name): id = self.idx.enums[name] output.write(" <enum name='%s' file='%s'" % (name, self.modulename_file(id.module))) | 16fa96c5d013ef465b4db98170c435eeded0c4d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/16fa96c5d013ef465b4db98170c435eeded0c4d4/apibuild.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4472,
67,
7924,
12,
2890,
16,
876,
16,
508,
4672,
612,
273,
365,
18,
3465,
18,
7924,
87,
63,
529,
65,
876,
18,
2626,
2932,
565,
411,
7924,
508,
28713,
87,
11,
585,
28713,
87,
4970,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4472,
67,
7924,
12,
2890,
16,
876,
16,
508,
4672,
612,
273,
365,
18,
3465,
18,
7924,
87,
63,
529,
65,
876,
18,
2626,
2932,
565,
411,
7924,
508,
28713,
87,
11,
585,
28713,
87,
4970,
... |
notification = self._channel.wait() | try: notification = self._channel.wait() except MediaStreamDidFailError: continue | def end(self): if self.greenlet is not None: api.kill(self.greenlet, api.GreenletExit()) self.greenlet = api.getcurrent() notification_center = NotificationCenter() if self._invitation is None or self._invitation.state in (None, 'disconnecting', 'disconnected'): return self.state = 'terminating' if self._invitation.state == 'connected': notification_center.post_notification('SIPSessionWillEnd', self, TimestampedNotificationData(originator='local')) streams = (self.streams or []) + (self.proposed_streams or []) for stream in list(streams): try: notification_center.remove_observer(self, sender=stream) except KeyError: streams.remove(stream) else: stream.deactivate() cancelling = self._invitation.state != 'connected' try: self._invitation.end(timeout=1) while True: notification = self._channel.wait() if notification.name == 'SIPInvitationChangedState' and notification.data.state == 'disconnected': if cancelling: notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='local', method='INVITE', code=notification.data.code, reason=notification.data.reason)) elif hasattr(notification.data, 'method'): notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method=notification.data.method, code=200, reason=sip_status_messages[200])) elif notification.data.disconnect_reason == 'user request': notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='local', method='BYE', code=notification.data.code, reason=notification.data.reason)) break except SIPCoreError, e: if cancelling: notification_center.post_notification('SIPSessionDidFail', self, TimestampedNotificationData(originator='local', code=0, reason=None, failure_reason='SIP core error: %s' % str(e), redirect_identities=None)) else: self.end_time = datetime.now() notification_center.post_notification('SIPSessionDidEnd', self, TimestampedNotificationData(originator='local', end_reason='SIP core error: %s' % str(e))) return finally: for stream in streams: stream.end() notification_center.remove_observer(self, sender=self._invitation) self.greenlet = None self.state = 'terminated' if cancelling: notification_center.post_notification('SIPSessionDidFail', self, TimestampedNotificationData(originator='local', code=487, reason='Session Canceled', failure_reason='user request', redirect_identities=None)) else: self.end_time = datetime.now() notification_center.post_notification('SIPSessionDidEnd', self, TimestampedNotificationData(originator='local', end_reason='user request')) | e55f5fca7d3ee8b3b8f621380488cc09d09a1eaa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/e55f5fca7d3ee8b3b8f621380488cc09d09a1eaa/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
12,
2890,
4672,
309,
365,
18,
11571,
1810,
353,
486,
599,
30,
1536,
18,
16418,
12,
2890,
18,
11571,
1810,
16,
1536,
18,
21453,
1810,
6767,
10756,
365,
18,
11571,
1810,
273,
1536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
12,
2890,
4672,
309,
365,
18,
11571,
1810,
353,
486,
599,
30,
1536,
18,
16418,
12,
2890,
18,
11571,
1810,
16,
1536,
18,
21453,
1810,
6767,
10756,
365,
18,
11571,
1810,
273,
1536,
... |
print "type_info", type_info print "preview_action", preview_action | def zmi_update_resource_types(self, type_info=None, preview_action=None, REQUEST=None): """Update resource types through the ZMI""" print "type_info", type_info print "preview_action", preview_action | 3c43017e5599a2a86b672daf41629250552395dc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10193/3c43017e5599a2a86b672daf41629250552395dc/plonelibrarytool.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
998,
9197,
67,
2725,
67,
3146,
67,
2352,
12,
2890,
16,
618,
67,
1376,
33,
7036,
16,
10143,
67,
1128,
33,
7036,
16,
12492,
33,
7036,
4672,
3536,
1891,
1058,
1953,
3059,
326,
2285,
7492,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
998,
9197,
67,
2725,
67,
3146,
67,
2352,
12,
2890,
16,
618,
67,
1376,
33,
7036,
16,
10143,
67,
1128,
33,
7036,
16,
12492,
33,
7036,
4672,
3536,
1891,
1058,
1953,
3059,
326,
2285,
7492,... | |
if isinstance(tree, _Text): return tree.toxml() | if isinstance(tree, xml.dom.minidom.Text): return tree.toxml() | def _dom_to_html_helper(self, tree, container, indent, seclevel): """ Helper function for L{_dom_to_html}, that does the real work of converting a DOM tree for an epytext string to HTML. @param tree: The DOM tree for an epytext string. @type tree: C{xml.dom.minidom.Element} @param container: The container in which to look up objects by name (e.g., for link directives). @type container: Python module @param indent: The number of characters indentation that should be used for HTML tags. @type indent: C{int} @param seclevel: The current section level. @type seclevel: int """ # This takes care of converting > to >, etc.: if isinstance(tree, _Text): return tree.toxml() if tree.tagName == 'epytext': indent -= 2 if tree.tagName == 'section': seclevel += 1 # Process the children first. children = [self._dom_to_html_helper(c, container, indent+2, seclevel) for c in tree.childNodes] # Get rid of unnecessary <P>...</P> tags; they introduce extra # space on most browsers that we don't want. for i in range(len(children)-1): if (not isinstance(tree.childNodes[i], _Text) and tree.childNodes[i].tagName == 'para' and (isinstance(tree.childNodes[i+1], _Text) or tree.childNodes[i+1].tagName != 'para')): children[i] = ' '*(indent+2)+children[i][5+indent:-5]+'\n' if (tree.hasChildNodes() and not isinstance(tree.childNodes[-1], _Text) and tree.childNodes[-1].tagName == 'para'): children[-1] = ' '*(indent+2)+children[-1][5+indent:-5]+'\n' # Construct the HTML string for the children. childstr = ''.join(children) # Perform the approriate action for the DOM tree type. if tree.tagName == 'para': return epytext.wordwrap('<p>%s</p>' % childstr, indent) elif tree.tagName == 'code': return '<code>%s</code>' % childstr elif tree.tagName == 'uri': return '<a href="%s">%s</a>' % (children[1], children[0]) elif tree.tagName == 'link': return self._dom_link_to_html(children[1], children[0], container) elif tree.tagName == 'italic': return '<i>%s</i>' % childstr elif tree.tagName == 'math': return '<i class="math">%s</i>' % childstr elif tree.tagName == 'index': return ('<a name="%s"></a>' % self._index_to_anchor(childstr) + '<i class="indexterm">%s</i>' % childstr) elif tree.tagName == 'bold': return '<b>%s</b>' % childstr elif tree.tagName == 'ulist': return '%s<ul>\n%s%s</ul>\n' % (indent*' ', childstr, indent*' ') elif tree.tagName == 'olist': startAttr = tree.getAttributeNode('start') if startAttr: start = ' start="%s"' % startAttr.value else: start = '' return ('%s<ol%s>\n%s%s</ol>\n' % (indent*' ', start, childstr, indent*' ')) elif tree.tagName == 'li': return indent*' '+'<li>\n%s%s</li>\n' % (childstr, indent*' ') elif tree.tagName == 'heading': return ('%s<h%s class="heading">%s</h%s>\n' % ((indent-2)*' ', seclevel, childstr, seclevel)) elif tree.tagName == 'literalblock': return '<pre class="literalblock">\n%s\n</pre>\n' % childstr elif tree.tagName == 'doctestblock': dtb = self._colorize_doctestblock(childstr.strip()) return '<pre class="doctestblock">\n%s</pre>\n' % dtb elif tree.tagName == 'fieldlist': raise AssertionError("There should not be any field lists left") elif tree.tagName in ('epytext', 'section', 'tag', 'arg', 'name', 'target'): return childstr else: raise ValueError('Warning: unknown epytext DOM element %r' % tree.tagName) | 36aef14a0edb4bd18076686105d0e4e6c7c10c23 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/36aef14a0edb4bd18076686105d0e4e6c7c10c23/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9859,
67,
869,
67,
2620,
67,
4759,
12,
2890,
16,
2151,
16,
1478,
16,
3504,
16,
1428,
2815,
4672,
3536,
9705,
445,
364,
511,
95,
67,
9859,
67,
869,
67,
2620,
5779,
716,
1552,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9859,
67,
869,
67,
2620,
67,
4759,
12,
2890,
16,
2151,
16,
1478,
16,
3504,
16,
1428,
2815,
4672,
3536,
9705,
445,
364,
511,
95,
67,
9859,
67,
869,
67,
2620,
5779,
716,
1552,
326... |
gLogger.error(errStr,"%s: %s" % (pathSURL,errMessage)) failed[pathSURL] = "%s %s" % (errStr,errMessage) resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict) def prestageFile(self,path,lifetime=60*60*24): | gLogger.error( errStr, "%s: %s" % ( pathSURL, errMessage ) ) failed[pathSURL] = "%s %s" % ( errStr, errMessage ) resDict = {'Failed':failed, 'Successful':successful} return S_OK( resDict ) def prestageFile( self, path, lifetime = 60 * 60 * 24 ): | def getTransportURL(self,path,protocols=False): """ Obtain the tURLs for the supplied path and protocols """ res = self.checkArgumentFormat(path) if not res['OK']: return res urls = res['Value'] | 70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29801,
1785,
12,
2890,
16,
803,
16,
31018,
33,
8381,
4672,
3536,
24850,
326,
268,
15749,
364,
326,
4580,
589,
471,
16534,
3536,
400,
273,
365,
18,
1893,
1379,
1630,
12,
803,
13,
309,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29801,
1785,
12,
2890,
16,
803,
16,
31018,
33,
8381,
4672,
3536,
24850,
326,
268,
15749,
364,
326,
4580,
589,
471,
16534,
3536,
400,
273,
365,
18,
1893,
1379,
1630,
12,
803,
13,
309,
4... |
out_nowrap = '<div class="cell_output_%snowrap_%s" id="cell_output_nowrap_%s">%s</div>'%( prnt, typ, self.__id, out_nowrap) | if not do_print: out_nowrap = '<div class="cell_output_%snowrap_%s" id="cell_output_nowrap_%s">%s</div>'%( prnt, typ, self.__id, out_nowrap) | def html_out(self, ncols=0, do_print=False): r""" Returns the HTML for self's output. | a3b2e55b2fd58511ceec0420bf9324b3fc734cdf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11792/a3b2e55b2fd58511ceec0420bf9324b3fc734cdf/cell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1729,
67,
659,
12,
2890,
16,
21330,
33,
20,
16,
741,
67,
1188,
33,
8381,
4672,
436,
8395,
2860,
326,
3982,
364,
365,
1807,
876,
18,
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,
0,
0,
0,
0,
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,
1729,
67,
659,
12,
2890,
16,
21330,
33,
20,
16,
741,
67,
1188,
33,
8381,
4672,
436,
8395,
2860,
326,
3982,
364,
365,
1807,
876,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for label, value in self.get_stats().iteritems(): | for label, value in profile.get_stats().iteritems(): | def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id) | d0bc9abc7d31b55da41ddae5d5c45d28aa6c1abb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/d0bc9abc7d31b55da41ddae5d5c45d28aa6c1abb/backend.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8994,
12,
2890,
16,
389,
350,
4672,
775,
30,
598,
365,
18,
11213,
30,
3042,
273,
365,
18,
11213,
18,
588,
67,
16121,
831,
24899,
350,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
8994,
12,
2890,
16,
389,
350,
4672,
775,
30,
598,
365,
18,
11213,
30,
3042,
273,
365,
18,
11213,
18,
588,
67,
16121,
831,
24899,
350,
13,
2,
-100,
-100,
-100,
-100,
-100,
-1... |
super(ReleaseEventComboBox, self).__init__(self.model) | self.combo = gtk.ComboBox(self.model) | def __init__(self): self.model = gtk.ListStore(object, str) super(ReleaseEventComboBox, self).__init__(self.model) render = gtk.CellRendererText() self.pack_start(render) self.set_attributes(render, markup=1) self.set_sensitive(False) | f02dd4bee6a524e5136471a21a81e079fe6300c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/f02dd4bee6a524e5136471a21a81e079fe6300c2/brainz.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
2284,
273,
22718,
18,
682,
2257,
12,
1612,
16,
609,
13,
365,
18,
25053,
273,
22718,
18,
22199,
12,
2890,
18,
2284,
13,
1743,
273,
22718,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
365,
18,
2284,
273,
22718,
18,
682,
2257,
12,
1612,
16,
609,
13,
365,
18,
25053,
273,
22718,
18,
22199,
12,
2890,
18,
2284,
13,
1743,
273,
22718,
18,
... |
return | return | def _refresh_model(self, model, submodel=None): if submodel: liststore = self.models[model][submodel] else: liststore = self.models[model] | 64e1ca025017891278f9940d2cf1488af419581a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2654/64e1ca025017891278f9940d2cf1488af419581a/gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9144,
67,
2284,
12,
2890,
16,
938,
16,
720,
2284,
33,
7036,
4672,
309,
720,
2284,
30,
666,
2233,
273,
365,
18,
7665,
63,
2284,
6362,
1717,
2284,
65,
469,
30,
666,
2233,
273,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
9144,
67,
2284,
12,
2890,
16,
938,
16,
720,
2284,
33,
7036,
4672,
309,
720,
2284,
30,
666,
2233,
273,
365,
18,
7665,
63,
2284,
6362,
1717,
2284,
65,
469,
30,
666,
2233,
273,
365... |
mo = reg.search(outp) | mo = self._reg.search(outp) | def _request(self,*args,**kw): | a72f5e502c7ba23a409dc043b2e0e62795e4048a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a72f5e502c7ba23a409dc043b2e0e62795e4048a/testSecurity.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2293,
12,
2890,
16,
14,
1968,
16,
636,
9987,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2293,
12,
2890,
16,
14,
1968,
16,
636,
9987,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
minute = minute + "AM" | minute = minute + " AM" | def getTime(date): """ Return a string representation in 24h format of the time corresponding to the given date @type date : datetime @return : string """ hour = date.hour minute = date.minute if minute == 0: minute = "00" else: minute = "%s" %minute if hour > 12: hour = hour - 12 minute = minute + " PM" else: minute = minute + "AM" return "%s:%s" %(hour, minute) | 425b34d6e73ece9b541623e89f6e14bd134f1e8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/425b34d6e73ece9b541623e89f6e14bd134f1e8f/QAUITestAppLib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6135,
12,
712,
4672,
3536,
2000,
279,
533,
4335,
316,
4248,
76,
740,
434,
326,
813,
4656,
358,
326,
864,
1509,
632,
723,
1509,
294,
3314,
632,
2463,
294,
533,
3536,
6126,
273,
1509,
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,
6135,
12,
712,
4672,
3536,
2000,
279,
533,
4335,
316,
4248,
76,
740,
434,
326,
813,
4656,
358,
326,
864,
1509,
632,
723,
1509,
294,
3314,
632,
2463,
294,
533,
3536,
6126,
273,
1509,
18... |
if verbose: | if verbose >= self.LOUD: | def _sundials_f(t, x, dx, f_data): """The sundials' RHS evaluation function. This function basically moves data between SUNDIALS arrays and NumPy arrays. Parameters: t -- the point time on which the evalution is being done. x -- the states. dx -- the derivatives of the states. f_data -- contains the model and an array with it's parameters. See SUNDIALS' manual and/or PySUNDIALS demos for more information. """ data = ctypes.cast(f_data, PUserData).contents model = data.model model.t = (t - data.t_sim_start) / data.t_sim_duration if data.ignore_p == 0: p = data.parameters sundials_params = p.params model.pi = sundials_params[p.pi_start : p.pi_end] model.u = sundials_params[p.u_start : p.u_end] # Copying from sundials space to model space and back again model.x = x model.eval_ode_f() dx[:] = model.dx return 0 | 2259378e77273c298d71047069b8f83885e323aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/2259378e77273c298d71047069b8f83885e323aa/sundials.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
87,
1074,
649,
87,
67,
74,
12,
88,
16,
619,
16,
6633,
16,
284,
67,
892,
4672,
3536,
1986,
272,
1074,
649,
87,
11,
534,
13173,
9873,
445,
18,
225,
1220,
445,
23772,
13934,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1074,
649,
87,
67,
74,
12,
88,
16,
619,
16,
6633,
16,
284,
67,
892,
4672,
3536,
1986,
272,
1074,
649,
87,
11,
534,
13173,
9873,
445,
18,
225,
1220,
445,
23772,
13934,
501,
... |
TargetAdd('PandaModules.py', input='libp3awesomium.dll') | pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n" | d66ff1a325010770d568493e86467c6e1ca71627 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8543/d66ff1a325010770d568493e86467c6e1ca71627/makepanda.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
293,
464,
842,
722,
67,
76,
1011,
1548,
82,
7,
318,
536,
225,
453,
4307,
37,
67,
3932,
1653,
39,
6365,
67,
5757,
64,
82,
6,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
293,
464,
842,
722,
67,
76,
1011,
1548,
82,
7,
318,
536,
225,
453,
4307,
37,
67,
3932,
1653,
39,
6365,
67,
5757,
64,
82,
6,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
v = ((x1-x0)* val)/self.conditionalDict[attrVals] | if i == len(aprioriDist)-1: v = x1-x0 - total else: v = int(((x1-x0)* val)/self.conditionalDict[attrVals]) | def addRect(self, x0, x1, y0, y1, condition = "", usedAttrs = [], attrVals = ""): x0 = int(x0); x1 = int(x1); y0 = int(y0); y1 = int(y1) if x0 == x1: x1+=1 if y0 == y1: y1+=1 | e9d9dacd9a0eba29f2c3082ac6763755c24eb485 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/e9d9dacd9a0eba29f2c3082ac6763755c24eb485/OWMosaicDisplay.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
6120,
12,
2890,
16,
619,
20,
16,
619,
21,
16,
677,
20,
16,
677,
21,
16,
2269,
273,
23453,
1399,
8262,
273,
5378,
16,
1604,
13169,
273,
1408,
4672,
619,
20,
273,
509,
12,
92,
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,
527,
6120,
12,
2890,
16,
619,
20,
16,
619,
21,
16,
677,
20,
16,
677,
21,
16,
2269,
273,
23453,
1399,
8262,
273,
5378,
16,
1604,
13169,
273,
1408,
4672,
619,
20,
273,
509,
12,
92,
2... |
expr = Expression(context, operands) | expr = AddressExpression(context, operands) | def parse_1DNADR(self, context, operands): retval = False pa = None if operands: expr = Expression(context, operands) if expr.complete: pa = expr.value if context.memmap.isErasable(pa): context.currentRecord.code = [ pa ] context.currentRecord.complete = True retval = True else: context.error("operand must be in erasable memory") return retval | 1bc9bc702b1a6f16b93c22e262ed22dfd4b79b9e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/1bc9bc702b1a6f16b93c22e262ed22dfd4b79b9e/directive.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
21,
8609,
1880,
54,
12,
2890,
16,
819,
16,
14883,
4672,
5221,
273,
1083,
6790,
273,
599,
309,
14883,
30,
3065,
273,
5267,
2300,
12,
2472,
16,
14883,
13,
309,
3065,
18,
6226,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21,
8609,
1880,
54,
12,
2890,
16,
819,
16,
14883,
4672,
5221,
273,
1083,
6790,
273,
599,
309,
14883,
30,
3065,
273,
5267,
2300,
12,
2472,
16,
14883,
13,
309,
3065,
18,
6226,
... |
this = apply(_quickfix.new_DefBidSize, args) | this = _quickfix.new_DefBidSize(*args) | def __init__(self, *args): this = apply(_quickfix.new_DefBidSize, args) try: self.this.append(this) except: self.this = this | 7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
3262,
17763,
1225,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
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,
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,
380,
1968,
4672,
333,
273,
389,
19525,
904,
18,
2704,
67,
3262,
17763,
1225,
30857,
1968,
13,
775,
30,
365,
18,
2211,
18,
6923,
12,
2211,
13,
1335,
30,
... |
self._decoded_text = '' self._snapshot = None | self._clear_decoded_text() | def readline(self, limit=None): if limit is None: limit = -1 if limit >= 0: # XXX Hack to support limit argument, for backwards compatibility line = self.readline() if len(line) <= limit: return line line, self._decoded_text = \ line[:limit], line[limit:] + self._decoded_text return line | 1e18b9ecf014bdc7f0b206c49c140c4f21edcb70 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/1e18b9ecf014bdc7f0b206c49c140c4f21edcb70/io.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
16,
1800,
33,
7036,
4672,
309,
1800,
353,
599,
30,
1800,
273,
300,
21,
309,
1800,
1545,
374,
30,
468,
11329,
670,
484,
358,
2865,
1800,
1237,
16,
364,
12727,
8926,
980... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
12023,
12,
2890,
16,
1800,
33,
7036,
4672,
309,
1800,
353,
599,
30,
1800,
273,
300,
21,
309,
1800,
1545,
374,
30,
468,
11329,
670,
484,
358,
2865,
1800,
1237,
16,
364,
12727,
8926,
980... |
return self._imported._all.imports | return self._imported.own.imports | def imports(self): if not self._imported: raise UnreachableImportError(self._id) return self._imported._all.imports | 46078d9a93aa41d0d58630f0427916f90830a36b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11977/46078d9a93aa41d0d58630f0427916f90830a36b/import_.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10095,
12,
2890,
4672,
309,
486,
365,
6315,
29266,
30,
1002,
1351,
17246,
5010,
668,
12,
2890,
6315,
350,
13,
327,
365,
6315,
29266,
6315,
454,
18,
21350,
2,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10095,
12,
2890,
4672,
309,
486,
365,
6315,
29266,
30,
1002,
1351,
17246,
5010,
668,
12,
2890,
6315,
350,
13,
327,
365,
6315,
29266,
6315,
454,
18,
21350,
2,
-100,
-100,
-100,
-100,
-100... |
def abbreviate(text, width=18, ellipsis='...'): | def abbreviate(text, width=15, ellipsis='...'): | def abbreviate(text, width=18, ellipsis='...'): """Abbreviate a given text. >>> abbreviate('This is an unnecessarily long piece of text!') 'This is an...' >>> abbreviate('Quite short, but still') 'Quite short, but...' >>> abbreviate('Quite short, but still', width=10) 'Quite...' """ lines = textwrap.wrap(text, width) if len(lines) > 1: return lines[0] + '...' else: return lines[0] | 337d2711caa86e4bdc6833aa559fb657b947991f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10431/337d2711caa86e4bdc6833aa559fb657b947991f/poi.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1223,
7379,
340,
12,
955,
16,
1835,
33,
3600,
16,
28992,
2218,
7821,
4672,
3536,
5895,
7379,
340,
279,
864,
977,
18,
225,
4080,
1223,
7379,
340,
2668,
2503,
353,
392,
16209,
21513,
1525,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1223,
7379,
340,
12,
955,
16,
1835,
33,
3600,
16,
28992,
2218,
7821,
4672,
3536,
5895,
7379,
340,
279,
864,
977,
18,
225,
4080,
1223,
7379,
340,
2668,
2503,
353,
392,
16209,
21513,
1525,... |
self.nu=0.4 | self.nu=0.5 | def __init__(self, **kwds): self.learner=orange.SVMLearner() self.svm_type=0 self.kernel_type=2 self.kernelFunc=None self.C=1.0 self.nu=0.4 self.p=0.1 self.gamma=0.2 self.degree=3 self.coef0=0 self.shrinking=1 self.probability=0 self.cache_size=100 self.eps=0.001 self.__dict__.update(kwds) self.learner=orange.SVMLearner(**kwds) | 9a93e290dce0aaac190b068b16cffecdebfe5d04 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/9a93e290dce0aaac190b068b16cffecdebfe5d04/orngSVM.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
25577,
4672,
365,
18,
298,
24834,
33,
280,
726,
18,
23927,
1495,
2091,
1224,
1435,
365,
18,
87,
3489,
67,
723,
33,
20,
365,
18,
8111,
67,
723,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
2826,
25577,
4672,
365,
18,
298,
24834,
33,
280,
726,
18,
23927,
1495,
2091,
1224,
1435,
365,
18,
87,
3489,
67,
723,
33,
20,
365,
18,
8111,
67,
723,
33... |
ts = self.path.sibling('sibling_test') self.assertEquals(ts.dirname(), self.path.dirname()) | p = self.path.child('sibling_start') ts = p.sibling('sibling_test') self.assertEquals(ts.dirname(), p.dirname()) | def testSibling(self): ts = self.path.sibling('sibling_test') self.assertEquals(ts.dirname(), self.path.dirname()) self.assertEquals(ts.basename(), 'sibling_test') ts.createDirectory() self.assertIn(ts, self.path.parent().children()) | e66c2ad7c5da3466f784cd5f113519b2f18c2621 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e66c2ad7c5da3466f784cd5f113519b2f18c2621/test_paths.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
10291,
12,
2890,
4672,
293,
273,
365,
18,
803,
18,
3624,
2668,
22734,
67,
1937,
6134,
3742,
273,
293,
18,
22734,
2668,
22734,
67,
3813,
6134,
365,
18,
11231,
8867,
12,
3428,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
10291,
12,
2890,
4672,
293,
273,
365,
18,
803,
18,
3624,
2668,
22734,
67,
1937,
6134,
3742,
273,
293,
18,
22734,
2668,
22734,
67,
3813,
6134,
365,
18,
11231,
8867,
12,
3428,
18,
... |
"evaltt": [eval_filter_factory, True], | "evaltt": [eval_filter_factory, True], "python": [python_filter_factory, True], | def stdout(text): sys.stdout.write(text) return "" | dd14c1ac5763faef6a7e03dba8d5ee4b7ded57e3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1390/dd14c1ac5763faef6a7e03dba8d5ee4b7ded57e3/filters.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3909,
12,
955,
4672,
2589,
18,
10283,
18,
2626,
12,
955,
13,
327,
1408,
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,
3909,
12,
955,
4672,
2589,
18,
10283,
18,
2626,
12,
955,
13,
327,
1408,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
elif self.enabled and set(['auth.password', 'auth.username', 'sip.outbound_proxy', 'sip.transport_list']).intersection(notification.data.modified): if self.sip.register: | elif self.enabled: if set(['auth.password', 'auth.username', 'sip.outbound_proxy', 'sip.transport_list', 'sip.register_interval']).intersection(notification.data.modified) and self.sip.register: | def _NH_CFGSettingsObjectDidChange(self, notification): # activate/deactivate the account or start/stop/reload the registration process if self._started: if 'enabled' in notification.data.modified: if self.enabled: self._activate() else: self._deactivate() elif self.enabled and 'sip.register' in notification.data.modified: if self.sip.register: self._registrar.activate() else: self._registrar.deactivate() elif self.enabled and set(['message_summary.enabled', 'message_summary.voicemail_uri']).intersection(notification.data.modified): if self.message_summary.enabled: self._mwi_handler.activate() else: self._mwi_handler.deactivate() elif self.enabled and set(['auth.password', 'auth.username', 'sip.outbound_proxy', 'sip.transport_list']).intersection(notification.data.modified): if self.sip.register: self._registrar.reload_settings() if self.message_summary.enabled: self._mwi_handler.activate() elif self.enabled and self.sip.register and 'sip.register_interval' in notification.data.modified: self._registrar.reload_settings() elif self.enabled and self.message_summary.enabled and 'sip.subscribe_interval' in notification.data.modified: self._mwi_handler.activate() | 5ff6d6829acebbcf50126c70a4918791823f2b50 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/5ff6d6829acebbcf50126c70a4918791823f2b50/account.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
50,
44,
67,
19727,
2628,
921,
18250,
3043,
12,
2890,
16,
3851,
4672,
468,
10235,
19,
323,
10014,
326,
2236,
578,
787,
19,
5681,
19,
17517,
326,
7914,
1207,
309,
365,
6315,
14561,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
50,
44,
67,
19727,
2628,
921,
18250,
3043,
12,
2890,
16,
3851,
4672,
468,
10235,
19,
323,
10014,
326,
2236,
578,
787,
19,
5681,
19,
17517,
326,
7914,
1207,
309,
365,
6315,
14561,
... |
print self.type, self.palette.name | def endElement(self, name): if name=='color': if self.type=='RGB': r=atof(self.attrs._attrs['r']) g=atof(self.attrs._attrs['g']) b=atof(self.attrs._attrs['b']) color_name=self.attrs._attrs['name'] self.palette.colors.append(RGB_Color(r,g,b, name=color_name)) #c,m,y,k=app.colormanager.convertRGB(r,g,b) #print '<color c="%f"'%c,'m="%f"'%m,'y="%f"'%y,'k="%f"'%k,'name="%s"'%color_name,'/>' if self.type=='CMYK': c=atof(self.attrs._attrs['c']) m=atof(self.attrs._attrs['m']) y=atof(self.attrs._attrs['y']) k=atof(self.attrs._attrs['k']) color_name=self.attrs._attrs['name'] self.palette.colors.append(CMYK_Color(c,m,y,k, name=color_name)) if self.type=='SPOT': r=atof(self.attrs._attrs['r']) g=atof(self.attrs._attrs['g']) b=atof(self.attrs._attrs['b']) c=atof(self.attrs._attrs['c']) m=atof(self.attrs._attrs['m']) y=atof(self.attrs._attrs['y']) k=atof(self.attrs._attrs['k']) color_name=self.attrs._attrs['name'] palette=self.palette.name self.palette.colors.append(CreateSPOTColor(r,g,b,c,m,y,k,color_name,palette)) if self.type=='SPOT-RGB': r=atof(self.attrs._attrs['r']) g=atof(self.attrs._attrs['g']) b=atof(self.attrs._attrs['b']) color_name=self.attrs._attrs['name'] palette=self.palette.name self.palette.colors.append(CreateSPOT_RGBColor(r,g,b,color_name,palette)) if self.type=='SPOT-CMYK': c=atof(self.attrs._attrs['c']) m=atof(self.attrs._attrs['m']) y=atof(self.attrs._attrs['y']) k=atof(self.attrs._attrs['k']) color_name=self.attrs._attrs['name'] palette=self.palette.name self.palette.colors.append(CreateSPOT_CMYKColor(c,m,y,k,color_name,palette)) if name=='description': self.type=self.attrs._attrs['type'] self.palette.name=self.attrs._attrs['name'] self.palette.type=self.attrs._attrs['type'] print self.type, self.palette.name | 159980d41b8c05a58f792aee7882421506443df4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3123/159980d41b8c05a58f792aee7882421506443df4/palette.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
12,
2890,
16,
508,
4672,
309,
508,
18920,
3266,
4278,
309,
365,
18,
723,
18920,
11343,
4278,
436,
33,
270,
792,
12,
2890,
18,
7039,
6315,
7039,
3292,
86,
19486,
314,
33,
270,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
12,
2890,
16,
508,
4672,
309,
508,
18920,
3266,
4278,
309,
365,
18,
723,
18920,
11343,
4278,
436,
33,
270,
792,
12,
2890,
18,
7039,
6315,
7039,
3292,
86,
19486,
314,
33,
270,
79... | |
filt.append(highpass(tr.data,self.slideHigh.val,df=tr.stats.sampling_rate)) print "One-Pass Highpass: %.2f Hz"%(self.slideHigh.val) | filt.append(highpass(tr.data,self.spinbuttonHighpass.get_value(),df=tr.stats.sampling_rate)) msg = "One-Pass Highpass: %.2f Hz"%(self.spinbuttonHighpass.get_value()) appendTextview(self.textviewStdOut, msg) | def updatePlot(self): filt=[] #filter data if self.flagFilt==True: if self.flagFiltZPH: if self.flagFiltTyp==0: for tr in self.streams[self.stPt].traces: filt.append(bandpassZPHSH(tr.data,self.slideHigh.val,self.slideLow.val,df=tr.stats.sampling_rate)) print "Zero-Phase Bandpass: %.2f-%.2f Hz"%(self.slideHigh.val,self.slideLow.val) if self.flagFiltTyp==1: for tr in self.streams[self.stPt].traces: filt.append(bandstopZPHSH(tr.data,self.slideHigh.val,self.slideLow.val,df=tr.stats.sampling_rate)) print "Zero-Phase Bandstop: %.2f-%.2f Hz"%(self.slideHigh.val,self.slideLow.val) if self.flagFiltTyp==2: for tr in self.streams[self.stPt].traces: filt.append(lowpassZPHSH(tr.data,self.slideLow.val,df=tr.stats.sampling_rate)) print "Zero-Phase Lowpass: %.2f Hz"%(self.slideLow.val) if self.flagFiltTyp==3: for tr in self.streams[self.stPt].traces: filt.append(highpassZPHSH(tr.data,self.slideHigh.val,df=tr.stats.sampling_rate)) print "Zero-Phase Highpass: %.2f Hz"%(self.slideHigh.val) else: if self.flagFiltTyp==0: for tr in self.streams[self.stPt].traces: filt.append(bandpass(tr.data,self.slideHigh.val,self.slideLow.val,df=tr.stats.sampling_rate)) print "One-Pass Bandpass: %.2f-%.2f Hz"%(self.slideHigh.val,self.slideLow.val) if self.flagFiltTyp==1: for tr in self.streams[self.stPt].traces: filt.append(bandstop(tr.data,self.slideHigh.val,self.slideLow.val,df=tr.stats.sampling_rate)) print "One-Pass Bandstop: %.2f-%.2f Hz"%(self.slideHigh.val,self.slideLow.val) if self.flagFiltTyp==2: for tr in self.streams[self.stPt].traces: filt.append(lowpass(tr.data,self.slideLow.val,df=tr.stats.sampling_rate)) print "One-Pass Lowpass: %.2f Hz"%(self.slideLow.val) if self.flagFiltTyp==3: for tr in self.streams[self.stPt].traces: filt.append(highpass(tr.data,self.slideHigh.val,df=tr.stats.sampling_rate)) print "One-Pass Highpass: %.2f Hz"%(self.slideHigh.val) #make new plots for i in range(len(self.plts)): self.plts[i].set_ydata(filt[i]) else: #make new plots for i in range(len(self.plts)): self.plts[i].set_ydata(self.streams[self.stPt][i].data) print "Unfiltered Traces" # Update all subplots self.redraw() | b822b77814749ba0fa0b0a638d2c2e8ccf514f6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/b822b77814749ba0fa0b0a638d2c2e8ccf514f6c/obspyck.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
11532,
12,
2890,
4672,
18553,
33,
8526,
468,
2188,
501,
309,
365,
18,
6420,
42,
4526,
631,
5510,
30,
309,
365,
18,
6420,
42,
4526,
62,
8939,
30,
309,
365,
18,
6420,
42,
4526,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
11532,
12,
2890,
4672,
18553,
33,
8526,
468,
2188,
501,
309,
365,
18,
6420,
42,
4526,
631,
5510,
30,
309,
365,
18,
6420,
42,
4526,
62,
8939,
30,
309,
365,
18,
6420,
42,
4526,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.