tag:blogger.com,1999:blog-4665533621031589212024-03-04T23:14:23.468-05:00Alg-CodeUnknownnoreply@blogger.comBlogger277125tag:blogger.com,1999:blog-466553362103158921.post-42867299476419041752011-07-26T20:27:00.000-04:002011-07-26T20:27:58.873-04:00How to: Use Python and Social Network Analysis to Find New Twitter Friends « Zero Intelligence Agents<a href="http://www.drewconway.com/zia/?p=345">How to: Use Python and Social Network Analysis to Find New Twitter Friends « Zero Intelligence Agents</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-45512348298987044902011-07-17T23:23:00.000-04:002011-07-17T23:23:56.902-04:00Debugger in PyDeVDebugger in PyDeV<br /><br /><a href="http://pydev.org/manual_adv_debugger.html">Debugger</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-53602689741704810612011-07-07T11:26:00.000-04:002011-07-07T11:26:44.315-04:00Language Summary by Jon Squire<a href="http://www.cs.umbc.edu/~squire/language_summary.shtml">Language Summary by Jon Squire</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-52177508013408329482011-07-07T10:54:00.000-04:002011-07-07T10:54:18.221-04:00Basic Tutorial — SciPyTutorial v0.0.1 documentation<a href="http://www.sam.math.ethz.ch/~hheumann/Tutorial/html/tutorial.html#why-do-both-numpy-linalg-and-scipy-linalg-exist-what-is-the-difference">Basic Tutorial — SciPyTutorial v0.0.1 documentation</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-43135217228286735722011-07-04T13:18:00.000-04:002011-07-04T13:18:21.140-04:00How to create Windows executable (.exe) from Python script<a href="http://logix4u.net/Python/Tutorials/How_to_create_Windows_executable_exe_from_Python_script.html">How to create Windows executable (.exe) from Python script</a>Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-466553362103158921.post-32890969322651624012011-06-22T19:42:00.000-04:002011-06-22T19:42:30.366-04:00python histogram one-liner - Stack Overflow<a href="http://stackoverflow.com/questions/2870466/python-histogram-one-liner">python histogram one-liner - Stack Overflow</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-33063247858977040212011-06-19T00:26:00.000-04:002011-06-19T00:26:15.573-04:00Using Weka from Python<a href="http://kogs-www.informatik.uni-hamburg.de/~meine/weka-python/">Using Weka from Python</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-69891078221369663142011-06-18T11:24:00.000-04:002011-06-18T11:24:46.946-04:00Python Course: Tutorial, Reference and Advanced Topics<a href="http://www.python-course.eu/index.php">Python Course: Tutorial, Reference and Advanced Topics</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-37095936210837577422011-06-18T10:56:00.000-04:002011-06-18T10:56:38.495-04:00Amund Tveit's Blog: Pragmatic Classification with Python<a href="http://amundblog.blogspot.com/2008/05/pragmatic-classification-with-python.html">Amund Tveit's Blog: Pragmatic Classification with Python</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-68257579111247968222011-06-16T03:14:00.000-04:002011-06-16T03:14:32.201-04:00Image Processing Lab in C# - CodeProject<a href="http://www.codeproject.com/KB/GDI-plus/Image_Processing_Lab.aspx">Image Processing Lab in C# - CodeProject</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-7114010561817174792011-06-14T11:13:00.001-04:002011-06-14T11:13:19.409-04:00Cookbook/Matplotlib/Interactive Plotting -<a href="http://www.scipy.org/Cookbook/Matplotlib/Interactive_Plotting">Cookbook/Matplotlib/Interactive Plotting -</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-63926329616710973082011-06-14T11:13:00.000-04:002011-06-14T11:13:05.767-04:00Making Dynamic Charts and Graphs for Your WebPage - Answer My Searches<a href="http://www.answermysearches.com/making-dynamic-charts-and-graphs-for-your-webpage/135/">Making Dynamic Charts and Graphs for Your WebPage - Answer My Searches</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-84534847134625194532011-06-13T22:39:00.000-04:002011-06-13T22:39:36.958-04:00Setup OpenCV 2.2 for Python in Windows | Luu Gia Thuy<a href="http://luugiathuy.com/2011/02/setup-opencv-for-python/">Setup OpenCV 2.2 for Python in Windows | Luu Gia Thuy</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-51913646145547143562011-06-10T11:39:00.000-04:002011-06-10T11:39:53.113-04:00www.dabeaz.com/SwigMaster/SWIGMaster.pdf<a href="http://www.dabeaz.com/SwigMaster/SWIGMaster.pdf">www.dabeaz.com/SwigMaster/SWIGMaster.pdf</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-31155409502938756022011-06-10T01:45:00.000-04:002011-06-10T01:45:52.009-04:00python - Creating ScrolledWindow in wxPython - Stack Overflow<a href="http://stackoverflow.com/questions/3392631/creating-scrolledwindow-in-wxpython">python - Creating ScrolledWindow in wxPython - Stack Overflow</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-72682523371746814912011-06-09T11:43:00.000-04:002011-06-09T11:43:33.992-04:00Advanced WxPython Nuts and Bolts Presentation<a href="http://www.scribd.com/doc/39082189/Advanced-WxPython-Nuts-and-Bolts-Presentation">Advanced WxPython Nuts and Bolts Presentation</a><div>
<br /></div><div><meta equiv="content-type" content="text/html; charset=utf-8"><a href="http://wxpython.org/OSCON2008/">http://wxpython.org/OSCON2008/</a></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-43988920950467740272011-06-09T03:18:00.000-04:002011-06-09T03:18:35.632-04:00wxPython-users - PyNoAppError: The wx.App object must be created first!<a href="http://wxpython-users.1045709.n5.nabble.com/PyNoAppError-The-wx-App-object-must-be-created-first-td2362821.html#none">wxPython-users - PyNoAppError: The wx.App object must be created first!</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-66208645866252089232011-06-09T02:10:00.001-04:002011-06-09T02:10:31.635-04:00PyNoAppError when coding wxpython in IDEL (ubuntu)<div>When Using the wxpython, Ubuntu, and IDEL, sometimes, I have the following problem:</div><div><br></div><div>PyNoAppError: The wx.App object must be created first!</div><div><br></div><div>Check about this, and it seems that IDEL (since it's build on wx...) has some conflict when using wxpython. I tried Drpython, which seems good for now. </div> <div><br></div><br>-- <br><font face="tahoma, sans-serif"><br></font><div><span style="line-height:22px"><font face="tahoma, sans-serif">♥ ¸¸.•*¨*•♫♪♪♫•*¨*•.¸¸♥</font></span></div> <div><span style="line-height:22px"><pre cols="72"><font face="tahoma, sans-serif" color="#3333FF">"Stay hungry, stay foolish" - Steve Jobs</font></pre></span></div><br> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-79685535846279325932011-06-08T18:29:00.001-04:002011-06-08T18:29:38.143-04:00About the wxPython: Exit, Destroy, Close<div><font class="Apple-style-span" face="Arial, Helvetica, 'Luxi Sans', sans-serif"><span class="Apple-style-span" style="font-size: 14px; white-space: pre;">Source: </span></font><a href="http://markmail.org/message/rfeswyjt24aq6a47">http://markmail.org/message/rfeswyjt24aq6a47</a></div> <div><font class="Apple-style-span" face="Arial, Helvetica, 'Luxi Sans', sans-serif"><span class="Apple-style-span" style="font-size: 14px; white-space: pre; "><br></span></font></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, 'Luxi Sans', sans-serif; font-size: 14px; white-space: pre; "><div class="quote quote-1" style="font-family: Arial, Helvetica, 'Luxi Sans', sans-serif; padding-left: 10px; color: blue; border-left-width: 2px; border-left-style: solid; border-left-color: blue; "> <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Robin Dunn wrote: </p><div class="quote quote-2" style="font-family: Arial, Helvetica, 'Luxi Sans', sans-serif; padding-left: 10px; color: green; border-left-width: 2px; border-left-style: solid; border-left-color: green; "><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> I assume that by "Exit" here you are still talking about the menu item above. </p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> No, I was referring to wx.Exit, which I think is a global call. </p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> It is a way to forcibly kill the app, without any opportunity for the application objects to clean up after themselves. Most of the time you wouldn't want to use it. </p><div class="quote quote-1" style="font-family: Arial, Helvetica, 'Luxi Sans', sans-serif; padding-left: 10px; color: blue; border-left-width: 2px; border-left-style: solid; border-left-color: blue; "><div class="quote quote-2" style="font-family: Arial, Helvetica, 'Luxi Sans', sans-serif; padding-left: 10px; color: green; border-left-width: 2px; border-left-style: solid; border-left-color: green; "> <p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">You use Close() when you want to programatically tell the frame to go close itself, and is functionally the same as the user telling it to close itself with the "X" button. </p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> </p><div class="quote quote-2" style="font-family: Arial, Helvetica, 'Luxi Sans', sans-serif; padding-left: 10px; color: green; border-left-width: 2px; border-left-style: solid; border-left-color: green; "><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> Destroy() tells wx to delete the C++ object instance that corresponds to the frame. Normally it will destroy itself when it closes in the default EVT_CLOSE event handler, but if you catch the EVT_CLOSE yourself you either need to call Destroy in your handler, or call event.Skip so the default handler will still run. The EVT_CLOSE handler is where you would normally put the code that checks for open files, asks the user if she wants to save them or cancel, etc. Based on the user's response you can veto the close if you want. </p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> I don't understand. So Close() does nothing more than make the window disappear? </p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> No, it tells the window to close itself. That is a lot different than just hiding it. </p><div class="quote quote-1" style="font-family: Arial, Helvetica, 'Luxi Sans', sans-serif; padding-left: 10px; color: blue; border-left-width: 2px; border-left-style: solid; border-left-color: blue; "><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> Does Close() then automatically call Destroy()? </p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> No, Close causes a EVT_CLOSE event to be sent. The default handler for that event calls Destroy(). </p><div class="quote quote-1" style="font-family: Arial, Helvetica, 'Luxi Sans', sans-serif; padding-left: 10px; color: blue; border-left-width: 2px; border-left-style: solid; border-left-color: blue; "><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> What happens if I catch the wx.EVT_CLOSE event and make it call self.frame.Close()? </p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> Then you'll get an endless loop. </p><div class="quote quote-1" style="font-family: Arial, Helvetica, 'Luxi Sans', sans-serif; padding-left: 10px; color: blue; border-left-width: 2px; border-left-style: solid; border-left-color: blue; "><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> Does it get destroyed also, or is the application still running somehow? </p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">According to you and Andrea, I think this is what I need: </p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">self.frame.Bind(wx.EVT_CLOSE, self.OnExitApp) </p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">def OnExitApp(self, event): self.frame.Destroy() </p><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Right? Or do I just use Close() still? </p></div><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> You use Close() from your menu event handler, or wherever you want to programatically cause the frame to be closed. You only need to provide a handler for EVT_CLOSE if you want to have more control over the closing of the frame than the default automatic destroy. </p><div class="footer signature" style="font-family: Arial, Helvetica, 'Luxi Sans', sans-serif; font-style: italic; white-space: pre; "><p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "> <br></p></div></span></div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-31424238434430381872011-06-03T11:03:00.000-04:002011-06-03T11:03:04.956-04:00Enthought Python, Sage, or others (in Unix clusters) - Stack Overflow<a href="http://stackoverflow.com/questions/2751058/enthought-python-sage-or-others-in-unix-clusters">Enthought Python, Sage, or others (in Unix clusters) - Stack Overflow</a><div><br /></div><div>http://stackoverflow.com/questions/2751058/enthought-python-sage-or-others-in-unix-clusters/2751347#2751347</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-20504565484480268822011-06-02T01:58:00.001-04:002011-06-02T01:58:46.471-04:00Limit the border size on a matplotlib graph<div><a href="http://stackoverflow.com/questions/1203639/how-do-i-limit-the-border-size-on-a-matplotlib-graph" target="_blank">http://stackoverflow.com/questions/1203639/how-do-i-limit-the-border-size-on-a-matplotlib-graph</a></div> <div><div>fig = pylab.figure()</div><div>ax_size = [0,0,1,1]</div><div>ax = fig.add_axes(ax_size)</div><div>ax.scatter(x[showd[0],:]-min(x[showd[0],:]),x[showd[1],:]-min(x[showd[1],:]),s=50,c=tc,cmap=pylab.cm.jet)</div> <div><br></div></div> Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-6335432509269056292011-06-01T21:13:00.000-04:002011-06-01T21:13:09.631-04:00Scatter plots with Basemap and Matplotlib « Stevendkay's Blog<a href="http://stevendkay.wordpress.com/2009/10/12/scatter-plots-with-basemap-and-matplotlib/">Scatter plots with Basemap and Matplotlib « Stevendkay's Blog</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-17806439451948537152011-05-31T17:03:00.000-04:002011-05-31T17:03:20.027-04:00Multiple Matrix Multiplication in numpy « James Hensman’s Weblog<a href="http://jameshensman.wordpress.com/2010/06/14/multiple-matrix-multiplication-in-numpy/">Multiple Matrix Multiplication in numpy « James Hensman’s Weblog</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-29757059785842316972011-05-31T01:32:00.001-04:002011-05-31T01:32:37.151-04:00How to display images simultaneously in wxPython? - Python<a href="http://www.daniweb.com/software-development/python/threads/177872">How to display images simultaneously in wxPython? - Python</a>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-466553362103158921.post-6698698722845082972011-05-31T01:32:00.000-04:002011-05-31T01:32:00.845-04:00AnotherTutorial - wxPyWiki<a href="http://wiki.wxpython.org/AnotherTutorial">AnotherTutorial - wxPyWiki</a>Unknownnoreply@blogger.com0