|
the posted:It's more appropriate for the Scientific/Computing thread in SAL, but here goes: Presumably the reason you had to explicitly generate the space of configurations for the 4x4 example were so you could verify your MCMC was exploring the sample space, then once you were confident in that you could scale up to larger systems. (and also consider this: if there weren't anything stopping us from considering all spin states why would we bother with doing the hill climb in the first place). And furthermore for numpy arrays "metro2 = 1*metro" will work to make a copy, but it turns out to be a little bit slower than .copy, at least sometimes.
|
# ? Sep 26, 2013 06:24 |
|
|
# ? May 30, 2024 10:05 |
|
Houston Rockets posted:Memory considerations are always important, especially in a language like Python. If you don't mind sharing, what exactly are you working on? Could you go a step further and use generators? You're probably not going to generate more than about 2**(low 30s).
|
# ? Sep 26, 2013 06:26 |
|
the posted:It's more appropriate for the Scientific/Computing thread in SAL, but here goes: No part of an Mcmc algorithm to sample from a density needs you to keep 2^400 of anything around. There's something off with how you're approaching this problem. Think of a better data structure or method to avoid keeping trivial samples.
|
# ? Sep 26, 2013 06:31 |
|
fritz posted:You're probably not going to generate more than about 2**(low 30s). Simulating a markov chain is something that generators with local state were born to do. It's a slick interface if you need to scan over all the candidate samples.
|
# ? Sep 26, 2013 06:34 |
|
Malcolm XML posted:Simulating a markov chain is something that generators with local state were born to do. It's a slick interface if you need to scan over all the candidate samples. Oh dang I never thought of using a generator to pull states from the posterior, that's a top quality idea.
|
# ? Sep 26, 2013 06:43 |
|
Yeah I have no idea what you guys are talking about.
|
# ? Sep 26, 2013 15:34 |
|
fritz posted:Oh dang I never thought of using a generator to pull states from the posterior, that's a top quality idea. Wait wouldn't you need to have logic in there to handle rejecting proposed draws?
|
# ? Sep 26, 2013 16:22 |
|
the posted:It's more appropriate for the Scientific/Computing thread in SAL, but here goes: Use Markov Chains like wikipedia says and you can turn it into a sort of generator instead of 2^100 and 2^400 configurations. Any time you want to access a specific configuration you iterate through the simulation. e: fb; waaay late on this I guess. deimos fucked around with this message at 17:01 on Sep 26, 2013 |
# ? Sep 26, 2013 16:56 |
|
fritz posted:Wait wouldn't you need to have logic in there to handle rejecting proposed draws? and? a generator is a black box that yields values. you could have one spin in an infinite loop if you really wanted to
|
# ? Sep 26, 2013 16:57 |
|
I'm migrating some of the helper scripts I've written over the years in AutoIt to Python to improve my Python coding. Some of these AutoIt scripts have minimalist Windows GUI elements like a system tray icon that shows that the script is running and can display status as a tooltip on that icon. I'd like to replicate that functionality with the least-possible effort and module dependencies. wxPython seems to be a decent cross-platform library for basic GUI stuff like tray icons, though the documentation seems thin. Can anyone vouch for it and whether or not any of the reference books ("wxPython in Action", "wxPython 2.8 Application Development Cookbook") are worthwhile?
|
# ? Sep 26, 2013 17:21 |
|
onionradish posted:I'm migrating some of the helper scripts I've written over the years in AutoIt to Python to improve my Python coding. Some of these AutoIt scripts have minimalist Windows GUI elements like a system tray icon that shows that the script is running and can display status as a tooltip on that icon. I'd like to replicate that functionality with the least-possible effort and module dependencies. Years ago I did something similar. I don't really have an answer for you, but I thought I'd note that I found it easiest to use the AutoIT COM bindings from Python as they make it super easy to do AutoIT-type of stuff like getting window sizes and whatnot. Python code:
|
# ? Sep 26, 2013 18:52 |
|
wxPython isn't well maintained, or maybe 'abandoned' depending on who you ask. PyQt is better. Neither is good.
|
# ? Sep 26, 2013 19:28 |
|
wxWidgets isn't maintained either, so it's no surprise that wxPython isn't maintained. I hack on GTK+ as a day job, but you guys would probably hate it. In my opinion, the easiest way to get a UI up with Python is to make a web-based UI. Which isn't great.
|
# ? Sep 26, 2013 19:45 |
|
I've been using Kivy, and it works pretty well for building UIs. I suggest at least reading the intro to it. edit: Be warned that the documentation is kinda crap. Pollyanna fucked around with this message at 23:49 on Sep 26, 2013 |
# ? Sep 26, 2013 20:33 |
|
Does anyone have a dev version of cx_freeze compiled? (the folder in site-packages or wherever) The only lead on the compiling-with-scipy bug I posted about is that it might be a bug in cx_freeze that's been fixed in the dev version. I've mostly given up on building modules from setup.pys.
|
# ? Sep 27, 2013 00:22 |
|
Things that suck about python:
|
# ? Sep 27, 2013 02:00 |
|
Thermopyle posted:Things that suck about python:
|
# ? Sep 27, 2013 02:07 |
|
Dominoes posted:To add to this, PyQT(and presumably PySide) seems like a strong framework, but the available docs and tutorials are too unintuitive or outdated, making it very difficult to learn. Also, standalone programs made with it have unnecessarily-large file sizes, especially with Qt5. Yeah, the last time I tried doing non-web UI's with Python it was with PySide, and while I got the job done, I hated doing it largely because of the docs.
|
# ? Sep 27, 2013 02:10 |
|
Thermopyle posted:Things that suck about python: I disagree with the first point, PyQt is a great GUI framework, probably because of its C++ origins. I would also suggest that no language has a good gaming framework, but that is a line of discussion that I don't care to go down
|
# ? Sep 27, 2013 02:37 |
|
Kivy is unfortunately not much better in that regard. Ugh, what a loving pain.Thermopyle posted:Things that suck about python: So that rules out applications and games...which is quite a big chunk of the programming world. I'm actually considering just making applications in Objective-C instead ( ). QuarkJets posted:I disagree with the first point, PyQt is a great GUI framework, probably because of its C++ origins. Don't you have to pay for PyQt?
|
# ? Sep 27, 2013 02:37 |
|
Pollyanna posted:Don't you have to pay for PyQt? PySide, what I posted earlier, is python bindings for the Qt framework http://qt-project.org/wiki/Category:LanguageBindings::PySide I never tried Kivy but PySide wasn't that bad (I had application development experience prior though) The documentation certainly leaves something to be desired, but that's not too uncommon in the python world.
|
# ? Sep 27, 2013 02:42 |
|
Pollyanna posted:Don't you have to pay for PyQt?
|
# ? Sep 27, 2013 02:44 |
|
Oh dang, I had tried to install that but it hosed up for some reason. According to Python tho it has a really old version installed. Lemme try again with PySide, thanks. Also, I kinda feel spoiled on syntax and grammar by starting out with Python. Everything else looks like a mess to me, especially C-style. Makes moving to Objective-C or Java something again to culture shock. quote:error: Setup script exited with error: Error configuring shiboken Pollyanna fucked around with this message at 02:50 on Sep 27, 2013 |
# ? Sep 27, 2013 02:45 |
|
Is it extremely difficult to make a py2exe type thing or is it just a space no one seems to care about enough to bother with currently? I (obviously) know nothing about this, so this is a real question.
The March Hare fucked around with this message at 02:54 on Sep 27, 2013 |
# ? Sep 27, 2013 02:47 |
|
The March Hare posted:Is it extremely difficult to make a py2exe type thing or is it just a space no one seems to care about enough to bother with currently? I (obviously) know nothing about this, so this is a real question. Does anyone have current instructions for compiling modules from source on Windows? The first answer here is the best guide I've found, but I'm stuck at "error: command 'gcc' failed with exit status 1". I removed all references to '-mno-cygwin' from cygwinccompiler.py, and still get the error. Dominoes fucked around with this message at 03:13 on Sep 27, 2013 |
# ? Sep 27, 2013 03:05 |
|
What version of PyGame do I want to download from here? I don't think I see a Python 2.7.5 64-bit version on there.
|
# ? Sep 27, 2013 04:31 |
|
Pollyanna posted:What version of PyGame do I want to download from here? I don't think I see a Python 2.7.5 64-bit version on there.
|
# ? Sep 27, 2013 04:41 |
|
Dominoes posted:I'm curious too. If I start contributing to an open-source project, this will be it. This is the exact thing that caused me to switch to Linux. pip install some_package and its downloaded and compiled easy-peasy. However, when I was on Windows I had the most success (meaning a very fragile set up) with Visual Studio Express and setting that up to compile with lots of Googlin'.
|
# ? Sep 27, 2013 04:52 |
|
If you dudes would like to contribute to python I have heard that http://pythonmentors.com is the place to go to get started. I am of the opinion that python very much needs someone to streamline package management and binary deliverables on windows.
|
# ? Sep 27, 2013 06:21 |
|
Dren posted:If you dudes would like to contribute to python I have heard that http://pythonmentors.com is the place to go to get started. Have you looked at Anaconda?
|
# ? Sep 27, 2013 06:32 |
|
I've never had to create a binary for a python application so I haven't been through that pain. What exactly are the difficulties inherent in turning a python package into a binary? I can't get my head around why Python is so weak in this area.
|
# ? Sep 27, 2013 13:08 |
|
BigRedDot posted:Have you looked at Anaconda? That looks pretty good. They seem to have a handle on the scientific/data stuff. Does the community have repos for it to support packages that continuum doesn't provide? E.g. How would I go about getting beautifulsoup with it?
|
# ? Sep 27, 2013 13:24 |
|
NtotheTC posted:I've never had to create a binary for a python application so I haven't been through that pain. What exactly are the difficulties inherent in turning a python package into a binary? I can't get my head around why Python is so weak in this area.
|
# ? Sep 27, 2013 14:08 |
|
Package management on windows has always been a loving nightmare, on any language. The closest thing to usefulness on windows came first from Maven (which still hosed up on any package with actual DLL bindings) then on the .NET front from NuGet. The problem with getting packages to work with windows is that there is no well established toolchain that can be easily installed. On pretty much every *nix you can expect a semi-well behaved gcc toolchain helping the package find it's headers and libraries and if not the package might have an easy way to get those libraries and headers to the right location. Where are headers stored in Windows? %PROGRAMFILES%\Microsoft SDKs\Windows Guess what, it's not non-admin writeable, and you can't really go shoving your own headers in there. Every package (or manager) would have to guess what headers are needed to build a binary because again, there is no well defined behavior. That's why compiling things like mysql packages is a loving nightmare on windows. deimos fucked around with this message at 16:20 on Sep 27, 2013 |
# ? Sep 27, 2013 16:18 |
|
NOTinuyasha posted:wxPython isn't well maintained, or maybe 'abandoned' depending on who you ask. PyQt is better. Neither is good. I used wxWindows and wxPython some years ago. I wouldn't say they were bad, but there was a definite feel to the community wx that you sometimes see where: - "What do you mean, there is absolutely nothing wrong with wx ..." - You're expected to spend all your time keeping up with wx, know instantly about changes and new releases, and be reading all the mailing lists - "Oh yeah, that doesn't work with version X. Get the new version from the repo / recompile all your tools and libraries / it'll be fixed in the next version ..." I've wasted too much time over the years on "tools that are a way of life", so I moved on. Qt looked far more promising, but I haven't kept up with developments in recent years.
|
# ? Sep 27, 2013 18:12 |
|
outlier posted:"tools that are a way of life" I like this way of phrasing it.
|
# ? Sep 27, 2013 18:43 |
|
deimos posted:Package management on windows has always been a loving nightmare, on any language. The closest thing to usefulness on windows came first from Maven (which still hosed up on any package with actual DLL bindings) then on the .NET front from NuGet. Pie in the sky here but someone could theoretically be the middle man between pip and windows, providing up to date windows binaries for stuff that's on pip. (only for stuff that can build on windows, of course).
|
# ? Sep 27, 2013 18:47 |
|
Dren posted:Pie in the sky here but someone could theoretically be the middle man between pip and windows, providing up to date windows binaries for stuff that's on pip. (only for stuff that can build on windows, of course). I hope this guy doesn't quit.
|
# ? Sep 27, 2013 19:03 |
|
Thermopyle posted:(Re: "tools that are a way of life") Thanks. It's a frequent irritant of mine, and an idea that came to me after working with Plone for several years. You spend too much time futzing around with the tool, trying to solve tool issues or work within tool idioms, rather than solving the problem domain you're actually interested in. Especially since I work as a computational biologist and programming is really, truly just a means to an end.
|
# ? Sep 27, 2013 19:36 |
|
|
# ? May 30, 2024 10:05 |
|
The March Hare posted:Is it extremely difficult to make a py2exe type thing or is it just a space no one seems to care about enough to bother with currently? I (obviously) know nothing about this, so this is a real question. Most people using Python don't have a need for compiling executables, so there's relatively little community interest.
|
# ? Sep 27, 2013 20:03 |