Q_Id int64 337 49.3M | CreationDate stringlengths 23 23 | Users Score int64 -42 1.15k | Other int64 0 1 | Python Basics and Environment int64 0 1 | System Administration and DevOps int64 0 1 | Tags stringlengths 6 105 | A_Id int64 518 72.5M | AnswerCount int64 1 64 | is_accepted bool 2
classes | Web Development int64 0 1 | GUI and Desktop Applications int64 0 1 | Answer stringlengths 6 11.6k | Available Count int64 1 31 | Q_Score int64 0 6.79k | Data Science and Machine Learning int64 0 1 | Question stringlengths 15 29k | Title stringlengths 11 150 | Score float64 -1 1.2 | Database and SQL int64 0 1 | Networking and APIs int64 0 1 | ViewCount int64 8 6.81M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
372,042 | 2008-12-16T17:32:00.000 | 2 | 0 | 1 | 0 | python,interface,abstract-class | 57,158,078 | 8 | false | 0 | 0 | Abstract classes are classes that contain one or more abstract methods. Along with abstract methods, Abstract classes can have static, class and instance methods.
But in case of interface, it will only have abstract methods not other. Hence it is not compulsory to inherit abstract class but it is compulsory to inherit ... | 2 | 612 | 0 | What is the difference between abstract class and interface in Python? | Difference between abstract class and interface in Python | 0.049958 | 0 | 0 | 442,422 |
372,102 | 2008-12-16T17:49:00.000 | 3 | 0 | 1 | 0 | python,regex | 372,210 | 3 | false | 0 | 0 | Don't use UTF-8 in a regular expression. UTF-8 is a multibyte encoding where some unicode code points are encoded by 2 or more bytes. You may match parts of your string that you didn't plan to match. Instead use unicode strings as suggested. | 1 | 7 | 0 | I'm aware that Python 3 fixes a lot of UTF issues, I am not however able to use Python 3, I am using 2.5.1
I'm trying to regex a document but the document has UTF hyphens in it – rather than -. Python can't match these and if I put them in the regex it throws a wobbly.
How can I force Python to use a UTF string or in s... | UTF in Python Regex | 0.197375 | 0 | 0 | 5,140 |
372,465 | 2008-12-16T19:50:00.000 | 3 | 1 | 0 | 0 | python,security,apache,download,lighttpd | 372,488 | 2 | false | 0 | 0 | You might want to just have your Python script open the file and dump the contents as its output if the user is properly authenticated. Put the files you want to protect in a folder that is outside of the webserver root. | 1 | 0 | 0 | How would I only allow users authenticated via Python code to access certain files on the server?
For instance, say I have /static/book.txt which I want to protect. When a user accesses /some/path/that/validates/him, a Python script deems him worthy of accessing /static/book.txt and redirects him to that path.
How woul... | Protecting online static content | 0.291313 | 0 | 0 | 274 |
372,511 | 2008-12-16T20:04:00.000 | 1 | 1 | 1 | 0 | python,oop,data-analysis | 372,779 | 14 | false | 0 | 0 | Actual C++ OO memory overhead is one pointer (4-8 bytes, depending) per object with virtual methods. However, as mentioned in other answers, the default memory allocation overhead from dynamic allocation is likely to be significantly greater than this.
If you're doing things halfway reasonably, neither overhead is lik... | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0.014285 | 0 | 0 | 3,461 |
372,511 | 2008-12-16T20:04:00.000 | 0 | 1 | 1 | 0 | python,oop,data-analysis | 372,848 | 14 | false | 0 | 0 | Since you can split the data in half and operate on it, I'm assuming that you're working on each record individually? It sounds to me like you need to change your deserialiser to read one record at a time, manipulate it, and then store out the results.
Basically you need a string parser class that does a Peek() which r... | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0 | 0 | 0 | 3,461 |
372,511 | 2008-12-16T20:04:00.000 | 0 | 1 | 1 | 0 | python,oop,data-analysis | 372,517 | 14 | false | 0 | 0 | Impossible to answer without knowing the shape of the data and the structure that you've designed to contain it. | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0 | 0 | 0 | 3,461 |
372,511 | 2008-12-16T20:04:00.000 | 0 | 1 | 1 | 0 | python,oop,data-analysis | 372,801 | 14 | false | 0 | 0 | A friend of mine was a professor at MIT and a student asked him why his image analysis program was running so slow. How was it built? Every pixel was an object, and would send messages to its neighbors!
If I were you I'd try it in a throw-away program. My suspicion is, unless your classes are very carefully coded, you'... | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0 | 0 | 0 | 3,461 |
372,511 | 2008-12-16T20:04:00.000 | 0 | 1 | 1 | 0 | python,oop,data-analysis | 372,724 | 14 | false | 0 | 0 | Please define "manipulate". If you really want to manipulate 4 gigs of data why do you want to manipulate it by pulling it ALL into memory right away?
I mean, who needs 4 gig of RAM anyway? :) | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0 | 0 | 0 | 3,461 |
372,511 | 2008-12-16T20:04:00.000 | 2 | 1 | 1 | 0 | python,oop,data-analysis | 372,524 | 14 | false | 0 | 0 | I wouldn't consider it fair to blame any shortcomings of your design to OOP. Just like any other programming platform out there OO can be used for both good and less than optimal design. Rarely will this be the fault of the programming model itself.
But to try to answer your question: Allocating 250000 new object requ... | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0.028564 | 0 | 0 | 3,461 |
372,511 | 2008-12-16T20:04:00.000 | 0 | 1 | 1 | 0 | python,oop,data-analysis | 372,658 | 14 | false | 0 | 0 | I don't think the question is overhead coming from OO.
If we accept C++ as an OO language and remember that the C++ compiler is a preprocessor to C (at least it used to be, when I used C++), anything done in C++ is really done in C. C has very little overhead. So it would depend on the libraries.
I think any overhead w... | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0 | 0 | 0 | 3,461 |
372,511 | 2008-12-16T20:04:00.000 | 0 | 1 | 1 | 0 | python,oop,data-analysis | 372,641 | 14 | false | 0 | 0 | Like the other posters have stated. I do not believe Objects are going to lend a significant amount of overhead to your process. It will need to store a pointer to the object but the rest of the 'doubles' will be taking 99% of your program's memory.
Can you partition this data into much smaller subsets? What is the tas... | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0 | 0 | 0 | 3,461 |
372,511 | 2008-12-16T20:04:00.000 | 3 | 1 | 1 | 0 | python,oop,data-analysis | 372,566 | 14 | false | 0 | 0 | You'd have similar issues with procedural/functional programming languages. How do you store that much data in memory? A struct or array wouldn't work either.
You need to take special steps to manage this scale of data.
BTW: I wouldn't use this as a reason to pick either an OO language or not. | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0.042831 | 0 | 0 | 3,461 |
372,511 | 2008-12-16T20:04:00.000 | 0 | 1 | 1 | 0 | python,oop,data-analysis | 372,595 | 14 | false | 0 | 0 | The "overhead" depends largely on the platform and the implementation you chose.
Now if you have a memory problem reading millions of data from a multiple Gb file, you're having an algorithm problem where the memory consumption of objects is definitely not the biggest concern, the concern yould be more about how you do... | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0 | 0 | 0 | 3,461 |
372,511 | 2008-12-16T20:04:00.000 | 0 | 1 | 1 | 0 | python,oop,data-analysis | 372,706 | 14 | false | 0 | 0 | compared to the size of your data set, the overhead of 250K objects is negligible
i think you're on the wrong path; don't blame objects for that ;-) | 11 | 2 | 0 | I have a large set of data (a data cube of 250,000 X 1,000 doubles, about a 4 gig file) and I want to manipulate it using a previous set of OOP classes I have written in Python. Currently the data set is already so large that to read into my machine memory I have to at least split it in half so computing overhead is a... | What is the object oriented programming computing overhead cost? | 0 | 0 | 0 | 3,461 |
372,885 | 2008-12-16T21:49:00.000 | 1 | 0 | 0 | 0 | python,mysql | 64,762,149 | 25 | false | 0 | 0 | First step to get The Library:
Open terminal and execute pip install mysql-python-connector.
After the installation go the second step.
Second Step to import the library:
Open your python file and write the following code:
import mysql.connector
Third step to connect to the server:
Write the following code:
conn = mys... | 1 | 1,242 | 0 | How do I connect to a MySQL database using a python program? | How do I connect to a MySQL Database in Python? | 0.008 | 1 | 0 | 1,369,727 |
373,383 | 2008-12-17T01:19:00.000 | 0 | 1 | 0 | 0 | python,api,rest,geocoding | 2,229,732 | 9 | false | 0 | 0 | You can have better look in Geopy module.And it is worth enough to use as it contains Google map, yahoo map geocoders with which you can implement geocodings. | 1 | 23 | 0 | I'm using python and I need to map locations like "Bloomington, IN" to GPS coordinates so I can measure distances between them.
What Geocoding libraries/APIs do you recommend? Solutions in other languages are also welcome. | Geocoding libraries | 0 | 0 | 1 | 13,754 |
373,406 | 2008-12-17T01:38:00.000 | 2 | 1 | 0 | 0 | javascript,python,sandbox | 373,415 | 1 | false | 1 | 0 | I use Lua for this, but it's directed at a Lua capable community. So my answer would be who are your users?
If your users are internal, like my case, and proficient with Python use Python. However if this is something for the world wide web, I'd probably choose javascript, because its the lingua franca, (every develope... | 1 | 7 | 0 | Beyond offering an API for my website, I'd like to offer users the ability to write simple scripts that would run on my servers . The scripts would have access to objects owned by the user and be able to manipulate, modify, and otherwise process their data.
I'd like to be able to limit resources taken by these scripts ... | Secure, sandboxable user exposed programming language / environment? | 0.379949 | 0 | 0 | 421 |
374,763 | 2008-12-17T14:49:00.000 | 1 | 1 | 1 | 0 | python,coding-style | 374,860 | 5 | false | 0 | 0 | I've seen it done both ways. Coming from an Objective-C background, I usually do foo()/set_foo() if I can't use a property (although I try to use properties whenever possible). It doesn't really matter that much, though, as long as you're consistent.
(Of course, in your example, I wouldn't call the method get_city_by_p... | 3 | 18 | 0 | In Python properties are used instead of the Java-style getters, setters. So one rarely sees get... or set.. methods in the public interfaces of classes.
But in cases were a property is not appropriate one might still end up with methods that behave like getters or setters. Now my questions: Should these method names s... | Should I use get_/set_ prefixes in Python method names? | 0.039979 | 0 | 0 | 4,305 |
374,763 | 2008-12-17T14:49:00.000 | 0 | 1 | 1 | 0 | python,coding-style | 375,661 | 5 | false | 0 | 0 | If I have to use a getter/setter, I like it this way:
Suppose you have a variable self._x. Then x() would return the value of self._x, and setX(x) would set the value of self._x | 3 | 18 | 0 | In Python properties are used instead of the Java-style getters, setters. So one rarely sees get... or set.. methods in the public interfaces of classes.
But in cases were a property is not appropriate one might still end up with methods that behave like getters or setters. Now my questions: Should these method names s... | Should I use get_/set_ prefixes in Python method names? | 0 | 0 | 0 | 4,305 |
374,763 | 2008-12-17T14:49:00.000 | 4 | 1 | 1 | 0 | python,coding-style | 374,856 | 5 | true | 0 | 0 | I think shorter is better, so I tend to prefer the later. But what's important is to consistent with your project: don't mix the two methods. If you jump into someone else's project, keep what the other developers chose initially. | 3 | 18 | 0 | In Python properties are used instead of the Java-style getters, setters. So one rarely sees get... or set.. methods in the public interfaces of classes.
But in cases were a property is not appropriate one might still end up with methods that behave like getters or setters. Now my questions: Should these method names s... | Should I use get_/set_ prefixes in Python method names? | 1.2 | 0 | 0 | 4,305 |
375,620 | 2008-12-17T18:54:00.000 | 0 | 1 | 0 | 1 | python,ftp,ftplib | 375,650 | 4 | false | 0 | 0 | You can't know when the OS copy is done. It could slow down or wait.
For absolute certainty, you really need two files.
The massive file.
And a tiny trigger file.
They can mess with the massive file all they want. But when they touch the trigger file, you're downloading both.
If you can't get a trigger, you have t... | 4 | 4 | 0 | We have a ftp system setup to monitor/download from remote ftp servers that are not under our control. The script connects to the remote ftp, and grabs the file names of files on the server, we then check to see if its something that has already been downloaded. If it hasn't been downloaded then we download the file an... | Prevent ftplib from Downloading a File in Progress? | 0 | 0 | 0 | 1,585 |
375,620 | 2008-12-17T18:54:00.000 | 5 | 1 | 0 | 1 | python,ftp,ftplib | 375,800 | 4 | true | 0 | 0 | “Damn the torpedoes! Full speed ahead!”
Just download the file. If it is a large file then after the download completes wait as long as is reasonable for your scenario and continue the download from the point it stopped. Repeat until there is no more stuff to download. | 4 | 4 | 0 | We have a ftp system setup to monitor/download from remote ftp servers that are not under our control. The script connects to the remote ftp, and grabs the file names of files on the server, we then check to see if its something that has already been downloaded. If it hasn't been downloaded then we download the file an... | Prevent ftplib from Downloading a File in Progress? | 1.2 | 0 | 0 | 1,585 |
375,620 | 2008-12-17T18:54:00.000 | 0 | 1 | 0 | 1 | python,ftp,ftplib | 375,716 | 4 | false | 0 | 0 | If you are dealing with multiple files, you could get the list of all the sizes at once, wait ten seconds, and see which are the same. Whichever are still the same should be safe to download. | 4 | 4 | 0 | We have a ftp system setup to monitor/download from remote ftp servers that are not under our control. The script connects to the remote ftp, and grabs the file names of files on the server, we then check to see if its something that has already been downloaded. If it hasn't been downloaded then we download the file an... | Prevent ftplib from Downloading a File in Progress? | 0 | 0 | 0 | 1,585 |
375,620 | 2008-12-17T18:54:00.000 | 0 | 1 | 0 | 1 | python,ftp,ftplib | 375,705 | 4 | false | 0 | 0 | As you say you have 0 control over the servers and can't make your clients post trigger files as suggested by S. Lott, you must deal with the imperfect solution and risk incomplete file transmission, perhaps by waiting for a while and compare file sizes before and after.
You can try to rename as you suggested, but as y... | 4 | 4 | 0 | We have a ftp system setup to monitor/download from remote ftp servers that are not under our control. The script connects to the remote ftp, and grabs the file names of files on the server, we then check to see if its something that has already been downloaded. If it hasn't been downloaded then we download the file an... | Prevent ftplib from Downloading a File in Progress? | 0 | 0 | 0 | 1,585 |
377,017 | 2008-12-18T05:55:00.000 | 0 | 1 | 0 | 1 | python,path | 377,590 | 15 | false | 0 | 0 | So basically you want to find a file in mounted filesystem (not necessarily in PATH directories only) and check if it is executable. This translates to following plan:
enumerate all files in locally mounted filesystems
match results with name pattern
for each file found check if it is executable
I'd say, doing this ... | 1 | 337 | 0 | In Python, is there a portable and simple way to test if an executable program exists?
By simple I mean something like the which command which would be just perfect. I don't want to search PATH manually or something involving trying to execute it with Popen & al and see if it fails (that's what I'm doing now, but imagi... | Test if executable exists in Python? | 0 | 0 | 0 | 167,325 |
377,362 | 2008-12-18T09:41:00.000 | 0 | 0 | 1 | 0 | python | 377,418 | 2 | false | 0 | 0 | Spaces vs. Tabs issue...ugh. >.>
Well, atleast it works now. I admit that I kind of miss the braces from C instead of forced-indentation. It's quite handy as a prototyping language though. Maybe I'll grow to love it more when I get a better grasp of it. | 2 | 1 | 0 | I have a block of code that basically intializes several classes, but they are placed in a sequential order, as later ones reference early ones.
For some reason the last one initializes before the first one...it seems to me there is some sort of threading going on. What I need to know is how can I stop it from doing th... | Code not waiting for class initialization! | 0 | 0 | 0 | 174 |
377,362 | 2008-12-18T09:41:00.000 | 0 | 0 | 1 | 0 | python | 377,382 | 2 | true | 0 | 0 | Python upto 3.0 has a global lock, so everything is running in a single thread and in sequence.
My guess is that some side effect initializes the last class from a different place than you expect. Throw an exception in __init__ of that last class to see where it gets called. | 2 | 1 | 0 | I have a block of code that basically intializes several classes, but they are placed in a sequential order, as later ones reference early ones.
For some reason the last one initializes before the first one...it seems to me there is some sort of threading going on. What I need to know is how can I stop it from doing th... | Code not waiting for class initialization! | 1.2 | 0 | 0 | 174 |
377,454 | 2008-12-18T10:20:00.000 | 115 | 0 | 1 | 0 | python,timer,sleep | 377,546 | 6 | false | 0 | 0 | Note that if you rely on sleep taking exactly 50 ms, you won't get that. It will just be about it. | 1 | 711 | 0 | How do I get my Python program to sleep for 50 milliseconds? | How do I get my program to sleep for 50 milliseconds? | 1 | 0 | 0 | 671,063 |
378,564 | 2008-12-18T17:27:00.000 | 2 | 0 | 1 | 0 | python,asynchronous | 378,836 | 3 | true | 0 | 0 | Also have a look at the Asynchronous Completion Token and ActiveObject patterns. | 1 | 8 | 0 | Are there any sorts of useful idioms I can make use of when writing an API that is asynchronous? I would like to standardize on something as I seem to be using a few different styles throughout. It seems hard to make asynchronous code simple; I suppose this is because asynchronous operations are anything but.
At the mo... | Idiomatic asynchronous design | 1.2 | 0 | 0 | 831 |
379,338 | 2008-12-18T21:23:00.000 | 4 | 0 | 0 | 0 | python,cherrypy,stringtemplate | 467,736 | 2 | false | 1 | 0 | Based on the tutorials for both, it looks pretty straightforward:
import stringtemplate
import cherrypy
class HelloWorld(object):
def index(self):
hello = stringtemplate.StringTemplate("Hello, $name$")
hello["name"] = "World"
return str(hello)
index.exposed = True
cherrypy.quickstart(... | 2 | 2 | 0 | I love the StringTemplate engine, and I love the CherryPy web server, and I know that they can be integrated.
Who has done it? How?
EDIT: The TurboGears framework takes the CherryPy web server and bundles other related components such as a template engine, data access tools, JavaScript kit, etc. I am interested in M... | How to integrate the StringTemplate engine into the CherryPy web server | 0.379949 | 0 | 0 | 1,241 |
379,338 | 2008-12-18T21:23:00.000 | 0 | 0 | 0 | 0 | python,cherrypy,stringtemplate | 463,042 | 2 | false | 1 | 0 | Rob,
There's reason behind people's selection of tools. StringTemplate is not terribly popular for Python, there are templating engines that are much better supported and with a much wider audience. If you don't like Kid, there's also Django's templating, Jinja, Cheetah and others. Perhaps you can find in one of them t... | 2 | 2 | 0 | I love the StringTemplate engine, and I love the CherryPy web server, and I know that they can be integrated.
Who has done it? How?
EDIT: The TurboGears framework takes the CherryPy web server and bundles other related components such as a template engine, data access tools, JavaScript kit, etc. I am interested in M... | How to integrate the StringTemplate engine into the CherryPy web server | 0 | 0 | 0 | 1,241 |
379,442 | 2008-12-18T21:52:00.000 | 1 | 0 | 0 | 0 | c++,python,performance,drawing,wxpython | 380,558 | 3 | false | 0 | 1 | For drawing, people have suggested PyGame. I like PyGame, its easy to work with and works well. Other choices would be Pyglet, or using PyOpenGL (you can most likely draw to a wx widget too, though I've never done it).
Personally, I'd do it in Python using whatever library I'm most familiar with (in my case, I'd use py... | 1 | 6 | 0 | I'm looking into writing a wxWidget that displays a graphical node network, and therefore does a lot of drawing operations. I know that using Python to do it is going to be slower, but I'd rather get it working and port it later when its functional. Ideally, if the performance hit isn't too great, I'd prefer to keep ... | How much slower is a wxWidget written in Python versus C++? | 0.066568 | 0 | 0 | 1,255 |
380,870 | 2008-12-19T12:42:00.000 | 27 | 0 | 1 | 0 | python,process,locking,mutual-exclusion | 380,876 | 23 | false | 0 | 0 | I don't know if it's pythonic enough, but in the Java world listening on a defined port is a pretty widely used solution, as it works on all major platforms and doesn't have any problems with crashing programs.
Another advantage of listening to a port is that you could send a command to the running instance. For exampl... | 4 | 145 | 0 | Is there a Pythonic way to have only one instance of a program running?
The only reasonable solution I've come up with is trying to run it as a server on some port, then second program trying to bind to same port - fails. But it's not really a great idea, maybe there's something more lightweight than this?
(Take int... | Make sure only a single instance of a program is running | 1 | 0 | 0 | 92,672 |
380,870 | 2008-12-19T12:42:00.000 | 5 | 0 | 1 | 0 | python,process,locking,mutual-exclusion | 380,894 | 23 | false | 0 | 0 | This may work.
Attempt create a PID file to a known location. If you fail, someone has the file locked, you're done.
When you finish normally, close and remove the PID file, so someone else can overwrite it.
You can wrap your program in a shell script that removes the PID file even if your program crashes.
You can, ... | 4 | 145 | 0 | Is there a Pythonic way to have only one instance of a program running?
The only reasonable solution I've come up with is trying to run it as a server on some port, then second program trying to bind to same port - fails. But it's not really a great idea, maybe there's something more lightweight than this?
(Take int... | Make sure only a single instance of a program is running | 0.043451 | 0 | 0 | 92,672 |
380,870 | 2008-12-19T12:42:00.000 | 2 | 0 | 1 | 0 | python,process,locking,mutual-exclusion | 4,337,301 | 23 | false | 0 | 0 | I'm posting this as an answer because I'm a new user and Stack Overflow won't let me vote yet.
Sorin Sbarnea's solution works for me under OS X, Linux and Windows, and I am grateful for it.
However, tempfile.gettempdir() behaves one way under OS X and Windows and another under other some/many/all(?) *nixes (ignoring th... | 4 | 145 | 0 | Is there a Pythonic way to have only one instance of a program running?
The only reasonable solution I've come up with is trying to run it as a server on some port, then second program trying to bind to same port - fails. But it's not really a great idea, maybe there's something more lightweight than this?
(Take int... | Make sure only a single instance of a program is running | 0.01739 | 0 | 0 | 92,672 |
380,870 | 2008-12-19T12:42:00.000 | 1 | 0 | 1 | 0 | python,process,locking,mutual-exclusion | 17,838,832 | 23 | false | 0 | 0 | I keep suspecting there ought to be a good POSIXy solution using process groups, without having to hit the file system, but I can't quite nail it down. Something like:
On startup, your process sends a 'kill -0' to all processes in a particular group. If any such processes exist, it exits. Then it joins the group. No ot... | 4 | 145 | 0 | Is there a Pythonic way to have only one instance of a program running?
The only reasonable solution I've come up with is trying to run it as a server on some port, then second program trying to bind to same port - fails. But it's not really a great idea, maybe there's something more lightweight than this?
(Take int... | Make sure only a single instance of a program is running | 0.008695 | 0 | 0 | 92,672 |
383,738 | 2008-12-20T21:04:00.000 | 2 | 0 | 0 | 0 | python,sockets,wsgi,httplib2,werkzeug | 52,826,181 | 4 | false | 1 | 0 | I had the same issue however with doing an upload of a very large file using a python-requests client posting to a nginx+uwsgi backend.
What ended up being the cause was the the backend had a cap on the max file size for uploads lower than what the client was trying to send.
The error never showed up in our uwsgi logs ... | 3 | 39 | 0 | We're developing a Python web service and a client web site in parallel. When we make an HTTP request from the client to the service, one call consistently raises a socket.error in socket.py, in read:
(104, 'Connection reset by peer')
When I listen in with wireshark, the "good" and "bad" responses look very similar:
... | 104, 'Connection reset by peer' socket error, or When does closing a socket result in a RST rather than FIN? | 0.099668 | 0 | 1 | 140,801 |
383,738 | 2008-12-20T21:04:00.000 | 11 | 0 | 0 | 0 | python,sockets,wsgi,httplib2,werkzeug | 481,952 | 4 | false | 1 | 0 | Don't use wsgiref for production. Use Apache and mod_wsgi, or something else.
We continue to see these connection resets, sometimes frequently, with wsgiref (the backend used by the werkzeug test server, and possibly others like the Django test server). Our solution was to log the error, retry the call in a loop, and... | 3 | 39 | 0 | We're developing a Python web service and a client web site in parallel. When we make an HTTP request from the client to the service, one call consistently raises a socket.error in socket.py, in read:
(104, 'Connection reset by peer')
When I listen in with wireshark, the "good" and "bad" responses look very similar:
... | 104, 'Connection reset by peer' socket error, or When does closing a socket result in a RST rather than FIN? | 1 | 0 | 1 | 140,801 |
383,738 | 2008-12-20T21:04:00.000 | 3 | 0 | 0 | 0 | python,sockets,wsgi,httplib2,werkzeug | 384,415 | 4 | false | 1 | 0 | Normally, you'd get an RST if you do a close which doesn't linger (i.e. in which data can be discarded by the stack if it hasn't been sent and ACK'd) and a normal FIN if you allow the close to linger (i.e. the close waits for the data in transit to be ACK'd).
Perhaps all you need to do is set your socket to linger so t... | 3 | 39 | 0 | We're developing a Python web service and a client web site in parallel. When we make an HTTP request from the client to the service, one call consistently raises a socket.error in socket.py, in read:
(104, 'Connection reset by peer')
When I listen in with wireshark, the "good" and "bad" responses look very similar:
... | 104, 'Connection reset by peer' socket error, or When does closing a socket result in a RST rather than FIN? | 0.148885 | 0 | 1 | 140,801 |
384,333 | 2008-12-21T10:48:00.000 | 3 | 0 | 0 | 0 | python,django,project,structure | 388,021 | 5 | false | 1 | 0 | A good question to ask yourself when deciding whether or not to write an app is "could I use this in another project?". If you think you could, then consider what it would take to make the application as independent as possible; How can you reduce the dependancies so that the app doesn't rely on anything specific to a... | 3 | 7 | 0 | I just wanted to try to build a project with django. Therefore I have a (basic) question on how to manage such a project. Since I cannot find any guidelines or so on how to split a project into applications.
Let's take a kind of SO as an example. Which applications would you use?
I'd say there should be the application... | How do you manage your Django applications? | 0.119427 | 0 | 0 | 1,848 |
384,333 | 2008-12-21T10:48:00.000 | 0 | 0 | 0 | 0 | python,django,project,structure | 384,377 | 5 | false | 1 | 0 | I'll tell you how I am approaching such question: I usually sit with a sheet of paper and draw the boxes (functionalities) and arrows (interdependencies between functionalities). I am sure there are methodologies or other things that could help you, but my approach usually works for me (YMMV, of course).
Knowing what a... | 3 | 7 | 0 | I just wanted to try to build a project with django. Therefore I have a (basic) question on how to manage such a project. Since I cannot find any guidelines or so on how to split a project into applications.
Let's take a kind of SO as an example. Which applications would you use?
I'd say there should be the application... | How do you manage your Django applications? | 0 | 0 | 0 | 1,848 |
384,333 | 2008-12-21T10:48:00.000 | 3 | 0 | 0 | 0 | python,django,project,structure | 384,494 | 5 | false | 1 | 0 | Just like any set of dependencies... try to find the most useful stand-alone aspects of the project and make those stand-alone apps. Other Django Apps will have higher level functionality, and reuse the parts of the lowest level apps that you have set up.
In my project, I have a calendar app with its own Event object... | 3 | 7 | 0 | I just wanted to try to build a project with django. Therefore I have a (basic) question on how to manage such a project. Since I cannot find any guidelines or so on how to split a project into applications.
Let's take a kind of SO as an example. Which applications would you use?
I'd say there should be the application... | How do you manage your Django applications? | 0.119427 | 0 | 0 | 1,848 |
384,471 | 2008-12-21T13:37:00.000 | 0 | 0 | 0 | 0 | python,mysql,python-3.x | 385,225 | 9 | false | 0 | 0 | You're probably better off using Python 2.x at the moment. It's going to be a while before all Python packages are ported to 3.x, and I expect writing a library or application with 3.x at the moment would be quite frustrating. | 1 | 36 | 0 | So, looking for a mysql-db-lib that is compatible with py3k/py3.0/py3000, any ideas? Google turned up nothing. | MySQL-db lib for Python 3.x? | 0 | 1 | 0 | 43,916 |
384,761 | 2008-12-21T18:22:00.000 | 3 | 1 | 1 | 0 | .net,com,ironpython | 385,013 | 1 | true | 0 | 0 | Answering my own post.. :-)
com_error may be replaced by System.Runtime.InteropServices.COMException
The pywintypes.Time may be replaced by System.DateTime, (DATE in IDispatch interface)
Still, if anybody knows about any good documentation on IronPython, COM interoperability and moving from pywin32 to .net, please re... | 1 | 1 | 0 | I have some old python code that uses the pywin32 extensions. Starting out with .net, I would like to port it to ironpython.
The old python code uses things like pythoncom.com_error, pywintypes.Time and interfaces a COM module that implements the IDispatch interface.
Does the .net libraries of ironpython have all I ne... | Does ironpython have libraries that replace the pywin32 extensions? | 1.2 | 0 | 0 | 887 |
385,403 | 2008-12-22T02:25:00.000 | 1 | 1 | 1 | 0 | javascript,python,language-agnostic,lua,oop | 3,958,261 | 5 | false | 0 | 0 | Classical inheritance is inherently flawed in terms of flexibility, in that we are saying "this object is of this type and no other". Some languages introduce multiple inheritance to alleviate this, but multiple inheritance has its own pitfalls, and so the benefits of pure composition over inheritance (which, in a stat... | 2 | 10 | 0 | I come from classes object orientation languages and recently I have been learning those fancy dynamic languages (JavaScript, Python and Lua) and I want some tips about how to use OO in those languages. It would be useful to know the pitfalls and the shortcomings of such approach and the advantages compared to traditio... | Prototype based object orientation. The good, the bad and the ugly? | 0.039979 | 0 | 0 | 4,736 |
385,403 | 2008-12-22T02:25:00.000 | 0 | 1 | 1 | 0 | javascript,python,language-agnostic,lua,oop | 385,417 | 5 | false | 0 | 0 | Okay, first of all, the prototype model isn't all that different in reality; Smalltalk uses a similar sort of scheme; the class is an object with the classes methods.
Looked at from the class POV, a class is really the equivalence class of objects with the same data, and all the same methods; you can look at adding a m... | 2 | 10 | 0 | I come from classes object orientation languages and recently I have been learning those fancy dynamic languages (JavaScript, Python and Lua) and I want some tips about how to use OO in those languages. It would be useful to know the pitfalls and the shortcomings of such approach and the advantages compared to traditio... | Prototype based object orientation. The good, the bad and the ugly? | 0 | 0 | 0 | 4,736 |
385,572 | 2008-12-22T04:35:00.000 | 0 | 0 | 1 | 0 | python,string,int,bit,casting | 386,651 | 5 | false | 0 | 0 | I don't think this can necessarily be answered well without more information. As others have said, there are only int and long for integers in python -- the language doesn't adhere to the bit-width and signedness archetypes of lower-level programming languages.
If you're operating completely within python, then you're ... | 2 | 24 | 0 | I need to convert strings in Python to other types such as unsigned and signed 8, 16, 32, and 64 bit ints, doubles, floats, and strings.
How can I do this? | Typecasting in Python | 0 | 0 | 0 | 101,991 |
385,572 | 2008-12-22T04:35:00.000 | 3 | 0 | 1 | 0 | python,string,int,bit,casting | 386,116 | 5 | false | 0 | 0 | The following types -- for the most part -- don't exist in Python in the first place. In Python, strings are converted to ints, longs or floats, because that's all there is.
You're asking for conversions that aren't relevant to Python in the first place. Here's the list of types you asked for and their Python equival... | 2 | 24 | 0 | I need to convert strings in Python to other types such as unsigned and signed 8, 16, 32, and 64 bit ints, doubles, floats, and strings.
How can I do this? | Typecasting in Python | 0.119427 | 0 | 0 | 101,991 |
386,655 | 2008-12-22T16:23:00.000 | 2 | 1 | 1 | 0 | python,performance,optimization,rewrite | 386,689 | 19 | false | 0 | 0 | I used to prototype lots of things in python for doing things like log processing. When they didn't run fast enough, I'd rewrite them in ocaml.
In many cases, the python was fine and I was happy with it. In some cases, as it started approaching 23 hours to do a days' logs, I'd get to rewriting. :)
I would like to po... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0.02105 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 19 | 1 | 1 | 0 | python,performance,optimization,rewrite | 386,702 | 19 | false | 0 | 0 | This is a much more difficult question to answer than people are willing to admit.
For example, it may be that I am able to write a program that performs better in Python than it does in C. The fallacious conclusion from that statement is "Python is therefore faster than C". In reality, it may be because I have muc... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 1 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 1 | 1 | 1 | 0 | python,performance,optimization,rewrite | 393,185 | 19 | false | 0 | 0 | A month ago i had this little program written in Python (for work) that analyzes logs.
When then number of log files grew, the program begun to be very slow and i thought i could rewrite it in Java.
I was very interesting. It took a whole day to migrate the same algorithm from Python to Java. At the end of the day, a f... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0.010526 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 2 | 1 | 1 | 0 | python,performance,optimization,rewrite | 386,706 | 19 | false | 0 | 0 | You can always write parts of your application in Python. Not every component is equally important for performance. Python integrates easily with C++ natively, or with Java via Jython, or with .NET via IronPython.
By the way, IronPython is more efficient than the C implementation of Python on some benchmarks. | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0.02105 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 7 | 1 | 1 | 0 | python,performance,optimization,rewrite | 386,999 | 19 | false | 0 | 0 | Not so far. I work for a company that has a molecular simulation engine and a bunch of programs written in python for processing the large multi-gigabyte datasets. All of our analysis software is now being written in Python because of the huge advantages in development flexibility and time.
If something is not fast en... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 1 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 7 | 1 | 1 | 0 | python,performance,optimization,rewrite | 386,770 | 19 | false | 0 | 0 | While at uni we were writing a computer vision system for analysing human behaviour based on video clips. We used python because of the excellent PIL, to speed up development and let us get easy access to the image frames we'd extracted from the video for converting to arrays etc.
For 90% of what we wanted it was fine ... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 1 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 2 | 1 | 1 | 0 | python,performance,optimization,rewrite | 386,752 | 19 | false | 0 | 0 | I've been working for a while now, developing an application that operate on large structured data, stored in several-gigabytes-thick-database and well, Python is good enough for that. The application has GUI client with a multitude of controls (lists, trees, notebooks, virtual lists and more), and a console server.
W... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0.02105 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 0 | 1 | 1 | 0 | python,performance,optimization,rewrite | 1,900,043 | 19 | false | 0 | 0 | I generally don't rewrite to C before I :
profile
rewrite with bette algorithms (generally this is enough)
rewrite python code with low level performance in mind (but never to the point of having non pythonic / non readable code)
spend some time rechecking a library cannot do this (first in stdlib, or an external lib... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 2 | 1 | 1 | 0 | python,performance,optimization,rewrite | 3,122,149 | 19 | false | 0 | 0 | Yes, twice:
An audio DSP application I wound up completely rewriting in C++ because I couldn't get appropriate performance in Python; I don't consider the Python implementation wasted because it let me prototype the concept very easily, and the C++ port went smoothly because I had a working reference implementaton.
A ... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0.02105 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 1 | 1 | 1 | 0 | python,performance,optimization,rewrite | 387,988 | 19 | false | 0 | 0 | No, I've never had to rewrite. In fact, I started using Python in Maya 8.5. Before Maya 8, the only scripting language available was the built in MEL (Maya Expression Language). Python is actually faster than the built in language that it wraps.
Python's ability to work with complex data types also made it faster be... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0.010526 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 2 | 1 | 1 | 0 | python,performance,optimization,rewrite | 501,942 | 19 | false | 0 | 0 | I am developing in python for several years now. Recently i had to list all files in a directory and build a struct with filename, size, attributes and modification date. I did this with os.listdir and os.stat. The code was quite fast, but the more entries in the directories, the slower my code became comapred to other... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0.02105 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 1 | 1 | 1 | 0 | python,performance,optimization,rewrite | 393,200 | 19 | false | 0 | 0 | I once had to write a pseudo-random number generator for a simulator. I wrote it in Python first, but Python proved to be way too slow; I ended up rewriting it in C, and even that was slow, but not nearly as slow as Python.
Luckily, it's fairly easy to bridge Python and C, so I was able to write the PRNG as a C module ... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0.010526 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 4 | 1 | 1 | 0 | python,performance,optimization,rewrite | 390,700 | 19 | false | 0 | 0 | This kind of question is likely to start a religious war among language people so let me answer it a little bit differently.
For most cases in today's computing environments your choice of programming language should be based on what you can program efficiently, program well and what makes you happy not the performance... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0.04208 | 0 | 0 | 8,929 |
386,655 | 2008-12-22T16:23:00.000 | 5 | 1 | 1 | 0 | python,performance,optimization,rewrite | 386,909 | 19 | false | 0 | 0 | Whenever I find a Python bottleneck, I rewrite that code in C as a Python module.
For example, I have some hardware that sends image pixels as 4-byte 0RGB. Converting 8M from 0RGB to RGB in Python takes too long so I rewrote it as a Python module.
Writing Python (or other higher level languages) is much faster than wri... | 14 | 47 | 0 | Has anyone ever had code in Python, that turned out not to perform fast enough?
I mean, you were forced to choose another language because of it?
We are investigating using Python for a couple of larger projects, and my feeling is that in most cases, Python is plenty fast enough for most scenarios (compared to say, Jav... | Python Performance - have you ever had to rewrite in something else? | 0.052583 | 0 | 0 | 8,929 |
387,606 | 2008-12-22T22:37:00.000 | 0 | 0 | 0 | 0 | python,sql,user-input | 387,800 | 4 | false | 0 | 0 | To start with, treat the barcode input as plain old text.
It has been quite a while since I worked with barcode scanners, but I doubt they have changed that much, the older ones used to just piggyback on the keyboard input, so from a programming perspective, the net result was a stream of characters in the keyboard ... | 3 | 1 | 0 | I need to design a program using python that will ask the user for a barcode. Then, using this barcode, it will search a mysql to find its corresponding product.
I am a bit stuck on how to get started. Does anyone have any tips for me? | Using user input to find information in a Mysql database | 0 | 1 | 0 | 4,847 |
387,606 | 2008-12-22T22:37:00.000 | 1 | 0 | 0 | 0 | python,sql,user-input | 387,622 | 4 | false | 0 | 0 | A barcode is simply a graphical representation of a series of characters (alphanumeric)
So if you have a method for users to enter this code (a barcode scanner), then its just an issue of querying the mysql database for the character string. | 3 | 1 | 0 | I need to design a program using python that will ask the user for a barcode. Then, using this barcode, it will search a mysql to find its corresponding product.
I am a bit stuck on how to get started. Does anyone have any tips for me? | Using user input to find information in a Mysql database | 0.049958 | 1 | 0 | 4,847 |
387,606 | 2008-12-22T22:37:00.000 | 0 | 0 | 0 | 0 | python,sql,user-input | 387,694 | 4 | false | 0 | 0 | That is a very ambiguous question. What you want can be done in many ways depending on what you actually want to do.
How are your users going to enter the bar code? Are they going to use a bar code scanner? Are they entering the bar code numbers manually?
Is this going to run on a desktop/laptop computer or is it goin... | 3 | 1 | 0 | I need to design a program using python that will ask the user for a barcode. Then, using this barcode, it will search a mysql to find its corresponding product.
I am a bit stuck on how to get started. Does anyone have any tips for me? | Using user input to find information in a Mysql database | 0 | 1 | 0 | 4,847 |
387,619 | 2008-12-22T22:40:00.000 | 7 | 0 | 0 | 0 | python,mysql | 387,932 | 4 | true | 0 | 0 | "However, opening and closing the connection with each update seems more 'neat'. "
It's also a huge amount of overhead -- and there's no actual benefit.
Creating and disposing of connections is relatively expensive. More importantly, what's the actual reason? How does it improve, simplify, clarify?
Generally, most a... | 3 | 2 | 0 | I'm writing a script in python which basically queries WMI and updates the information in a mysql database. One of those "write something you need" to learn to program exercises.
In case something breaks in the middle of the script, for example, the remote computer turns off, it's separated out into functions.
Query S... | Mysql Connection, one or many? | 1.2 | 1 | 0 | 1,201 |
387,619 | 2008-12-22T22:40:00.000 | 2 | 0 | 0 | 0 | python,mysql | 387,735 | 4 | false | 0 | 0 | I don't think that there is "better" solution. Its too early to think about resources. And since wmi is quite slow ( in comparison to sql connection ) the db is not an issue.
Just make it work. And then make it better.
The good thing about working with open connection here, is that the "natural" solution is to use obje... | 3 | 2 | 0 | I'm writing a script in python which basically queries WMI and updates the information in a mysql database. One of those "write something you need" to learn to program exercises.
In case something breaks in the middle of the script, for example, the remote computer turns off, it's separated out into functions.
Query S... | Mysql Connection, one or many? | 0.099668 | 1 | 0 | 1,201 |
387,619 | 2008-12-22T22:40:00.000 | 1 | 0 | 0 | 0 | python,mysql | 389,364 | 4 | false | 0 | 0 | Useful clues in S.Lott's and Igal Serban's answers. I think you should first find out your actual requirements and code accordingly.
Just to mention a different strategy; some applications keep a pool of database (or whatever) connections and in case of a transaction just pull one from that pool. It seems rather obviou... | 3 | 2 | 0 | I'm writing a script in python which basically queries WMI and updates the information in a mysql database. One of those "write something you need" to learn to program exercises.
In case something breaks in the middle of the script, for example, the remote computer turns off, it's separated out into functions.
Query S... | Mysql Connection, one or many? | 0.049958 | 1 | 0 | 1,201 |
390,263 | 2008-12-23T22:37:00.000 | 0 | 0 | 1 | 0 | python,excel,pywin32 | 390,304 | 2 | false | 0 | 0 | I tried this with Excel 2007 and VBA. It is giving correct value.
1) Try pasting this value in a new excel workbook
2) Press Alt + F11. Gets you to VBA Editor.
3) Press Ctrl + G. Gets you to immediate window.
4) In the immediate window, type ?cells("a1").Value
here "a1" is the cell where you have pasted the value.
I ... | 1 | 1 | 0 | I am using python to read a currency value from excel. The returned from the range.Value method is a tuple that I don't know how to parse.
For example, the cell appears as $548,982, but in python the value is returned as (1, 1194857614).
How can I get the numerical amount from excel or how can I convert this tuple valu... | Interpreting Excel Currency Values | 0 | 1 | 0 | 586 |
390,409 | 2008-12-23T23:43:00.000 | 1 | 1 | 0 | 0 | python,debugging,templates,jinja2,mako | 390,603 | 6 | false | 1 | 0 | I break them down into pieces, and then reassemble the pieces when I've found the problem.
Not good, but it's really hard to tell what went wrong in a big, complex template. | 1 | 41 | 0 | So far I've found it impossible to produce usable tracebacks when Mako templates aren't coded correctly.
Is there any way to debug templates besides iterating for every line of code? | How do you debug Mako templates? | 0.033321 | 0 | 0 | 10,962 |
390,867 | 2008-12-24T06:07:00.000 | 2 | 0 | 0 | 0 | python,wxpython,wxwidgets,model-view-controller,project-organization | 390,912 | 4 | false | 0 | 1 | As Mark stated you should make a new class that handles things like this.
The ideal layout of code when using something like wxWidgets is the model view controller where the wxFrame class only has the code needed to display items and all the logic and business rules are handled by other class that interact with the wx... | 3 | 1 | 0 | I'm starting out with wxPython and have been working my way through every tutorial and example I can get my hands on. I've run into a slight problem, however, and it has to do with the wx.App versus the wx.Frame and which should contain specific methods. Just about every example I've seen don't go much beyond layouts... | Calling Application Methods from a wx Frame Class | 0.099668 | 0 | 0 | 1,063 |
390,867 | 2008-12-24T06:07:00.000 | 2 | 0 | 0 | 0 | python,wxpython,wxwidgets,model-view-controller,project-organization | 394,333 | 4 | true | 0 | 1 | Your classes that inherit from wxWidgets/wxPython data types should not implement any business logic. wxWidgets is a GUI library, so any subclasses of wxApp or wxFrame should remain focused on GUI, that is on displaying the interface and being responsive to user actions.
The code that does something useful should be s... | 3 | 1 | 0 | I'm starting out with wxPython and have been working my way through every tutorial and example I can get my hands on. I've run into a slight problem, however, and it has to do with the wx.App versus the wx.Frame and which should contain specific methods. Just about every example I've seen don't go much beyond layouts... | Calling Application Methods from a wx Frame Class | 1.2 | 0 | 0 | 1,063 |
390,867 | 2008-12-24T06:07:00.000 | 0 | 0 | 0 | 0 | python,wxpython,wxwidgets,model-view-controller,project-organization | 390,887 | 4 | false | 0 | 1 | In a proper OOP design, this would be independent or part of a filesystem class - it wouldn't be part of the app or the frame. | 3 | 1 | 0 | I'm starting out with wxPython and have been working my way through every tutorial and example I can get my hands on. I've run into a slight problem, however, and it has to do with the wx.App versus the wx.Frame and which should contain specific methods. Just about every example I've seen don't go much beyond layouts... | Calling Application Methods from a wx Frame Class | 0 | 0 | 0 | 1,063 |
391,879 | 2008-12-24T17:23:00.000 | 22 | 0 | 1 | 0 | python,project-organization | 391,916 | 4 | false | 0 | 0 | "As is good practice I want to put them in a separate file each. "
This is not actually a very good practice. You should design modules that contain closely-related classes.
As a practical matter, no class actually stands completely alone. Generally classes come in clusters or groups that are logically related. | 1 | 46 | 0 | I'm starting a Python project and expect to have 20 or more classes in it. As is good practice I want to put them in a separate file each. However, the project directory quickly becomes swamped with files (or will when I do this).
If I put a file to import in a folder I can no longer import it. How do I import a file f... | Organising my Python project | 1 | 0 | 0 | 21,485 |
392,160 | 2008-12-24T20:13:00.000 | 20 | 1 | 1 | 0 | python,metaclass | 392,442 | 21 | false | 0 | 0 | Let's start with Tim Peter's classic quote:
Metaclasses are deeper magic than 99%
of users should ever worry about. If
you wonder whether you need them, you
don't (the people who actually need
them know with certainty that they
need them, and don't need an
explanation about why). Tim Peters
(c.l.p post 2... | 4 | 148 | 0 | I have a friend who likes to use metaclasses, and regularly offers them as a solution.
I am of the mind that you almost never need to use metaclasses. Why? because I figure if you are doing something like that to a class, you should probably be doing it to an object. And a small redesign/refactor is in order.
Being abl... | What are some (concrete) use-cases for metaclasses? | 1 | 0 | 0 | 32,950 |
392,160 | 2008-12-24T20:13:00.000 | 8 | 1 | 1 | 0 | python,metaclass | 7,057,480 | 21 | false | 0 | 0 | A reasonable pattern of metaclass use is doing something once when a class is defined rather than repeatedly whenever the same class is instantiated.
When multiple classes share the same special behaviour, repeating __metaclass__=X is obviously better than repeating the special purpose code and/or introducing ad-hoc sh... | 4 | 148 | 0 | I have a friend who likes to use metaclasses, and regularly offers them as a solution.
I am of the mind that you almost never need to use metaclasses. Why? because I figure if you are doing something like that to a class, you should probably be doing it to an object. And a small redesign/refactor is in order.
Being abl... | What are some (concrete) use-cases for metaclasses? | 1 | 0 | 0 | 32,950 |
392,160 | 2008-12-24T20:13:00.000 | 5 | 1 | 1 | 0 | python,metaclass | 5,330,521 | 21 | false | 0 | 0 | The only legitimate use-case of a metaclass is to keep other nosy developers from touching your code. Once a nosy developer masters metaclasses and starts poking around with yours, throw in another level or two to keep them out. If that doesn't work, start using type.__new__ or perhaps some scheme using a recursive met... | 4 | 148 | 0 | I have a friend who likes to use metaclasses, and regularly offers them as a solution.
I am of the mind that you almost never need to use metaclasses. Why? because I figure if you are doing something like that to a class, you should probably be doing it to an object. And a small redesign/refactor is in order.
Being abl... | What are some (concrete) use-cases for metaclasses? | 0.047583 | 0 | 0 | 32,950 |
392,160 | 2008-12-24T20:13:00.000 | 2 | 1 | 1 | 0 | python,metaclass | 7,058,179 | 21 | false | 0 | 0 | This is a minor use, but... one thing I've found metaclasses useful for is to invoke a function whenever a subclass is created. I codified this into a metaclass which looks for an __initsubclass__ attribute: whenever a subclass is created, all parent classes which define that method are invoked with __initsubclass__(c... | 4 | 148 | 0 | I have a friend who likes to use metaclasses, and regularly offers them as a solution.
I am of the mind that you almost never need to use metaclasses. Why? because I figure if you are doing something like that to a class, you should probably be doing it to an object. And a small redesign/refactor is in order.
Being abl... | What are some (concrete) use-cases for metaclasses? | 0.019045 | 0 | 0 | 32,950 |
392,217 | 2008-12-24T21:05:00.000 | 3 | 0 | 0 | 0 | python,html,ruby,layout | 392,243 | 2 | false | 1 | 0 | Scriptor, I think what you likely are looking for might be something in JavaScript more then Ruby or Python. I mean - the positions and sizes are essentially going to be determined by the rendering engine (the browser). You might consider using something like jQuery to loop through all of your desired objects - outputt... | 2 | 3 | 0 | I'm looking for a library in Ruby or Python that would take some HTML and CSS as the input and return data that contains the positions and sizes of the elements. If it helps, I don't need the info for all the elements but just the major divs of the page. | Is there a Ruby/Python HTML reflow/layout library? | 0.291313 | 0 | 0 | 488 |
392,217 | 2008-12-24T21:05:00.000 | -1 | 0 | 0 | 0 | python,html,ruby,layout | 392,412 | 2 | false | 1 | 0 | Both Ruby and Python have a Regex library. Why not search for things like /width=\"(\d+)px\"/ and /height:(\d+)px/. Use $1 to find the value in the group. I'm not a regex expert and I'm doing this from memory, so refer to any of the tutorials on the net for the correct syntax and variable usage, but that's where to ... | 2 | 3 | 0 | I'm looking for a library in Ruby or Python that would take some HTML and CSS as the input and return data that contains the positions and sizes of the elements. If it helps, I don't need the info for all the elements but just the major divs of the page. | Is there a Ruby/Python HTML reflow/layout library? | -0.099668 | 0 | 0 | 488 |
392,624 | 2008-12-25T08:25:00.000 | -1 | 1 | 1 | 1 | c#,java,python,networking | 393,963 | 15 | false | 0 | 0 | C++ and Java are quite slow compared to C. The language should be a tool but not a crutch. | 9 | 15 | 0 | I was just wondering what language would be a good choice for developing a game server to support a large (thousands) number of users? I dabbled in python, but realized that it would just be too much trouble since it doesn't spawn threads across cores (meaning an 8 core server=1 core server). I also didn't really like ... | Good language to develop a game server in? | -0.013333 | 0 | 0 | 16,457 |
392,624 | 2008-12-25T08:25:00.000 | 0 | 1 | 1 | 1 | c#,java,python,networking | 392,874 | 15 | false | 0 | 0 | What are your objectives? Not the creation of the game itself, but why are you creating it?
If you're doing it to learn a new language, then pick the one that seems the most interesting to you (i.e., the one you most want to learn).
If it is for any other reason, then the best language will be the one that you already... | 9 | 15 | 0 | I was just wondering what language would be a good choice for developing a game server to support a large (thousands) number of users? I dabbled in python, but realized that it would just be too much trouble since it doesn't spawn threads across cores (meaning an 8 core server=1 core server). I also didn't really like ... | Good language to develop a game server in? | 0 | 0 | 0 | 16,457 |
392,624 | 2008-12-25T08:25:00.000 | 3 | 1 | 1 | 1 | c#,java,python,networking | 392,831 | 15 | false | 0 | 0 | More details about this game server might help folks better answer your question. Is this a game server in the sense of something like a Counter Strike dedicated server which sits in the background and hosts multiplayer interactions or are you writing something which will be hosted on an HTTP webserver?
Personally, if... | 9 | 15 | 0 | I was just wondering what language would be a good choice for developing a game server to support a large (thousands) number of users? I dabbled in python, but realized that it would just be too much trouble since it doesn't spawn threads across cores (meaning an 8 core server=1 core server). I also didn't really like ... | Good language to develop a game server in? | 0.039979 | 0 | 0 | 16,457 |
392,624 | 2008-12-25T08:25:00.000 | 1 | 1 | 1 | 1 | c#,java,python,networking | 392,645 | 15 | false | 0 | 0 | It may depend a lot on what language your "game logic" (you may know this term as "business logic") is best expressed in. For example, if the game logic is best expressed in Python (or any other particular language) it might be best to just write it in Python and deal with the performance issues the hard way with eithe... | 9 | 15 | 0 | I was just wondering what language would be a good choice for developing a game server to support a large (thousands) number of users? I dabbled in python, but realized that it would just be too much trouble since it doesn't spawn threads across cores (meaning an 8 core server=1 core server). I also didn't really like ... | Good language to develop a game server in? | 0.013333 | 0 | 0 | 16,457 |
392,624 | 2008-12-25T08:25:00.000 | 2 | 1 | 1 | 1 | c#,java,python,networking | 392,764 | 15 | false | 0 | 0 | You could as well use Java and compile the code using GCC to a native executable.
That way you don't get the performance hit of the bytecode engine (Yes, I know - Java out of the box is as fast as C++. It must be just me who always measures a factor 5 performance difference). The drawback is that the GCC Java-frontend ... | 9 | 15 | 0 | I was just wondering what language would be a good choice for developing a game server to support a large (thousands) number of users? I dabbled in python, but realized that it would just be too much trouble since it doesn't spawn threads across cores (meaning an 8 core server=1 core server). I also didn't really like ... | Good language to develop a game server in? | 0.02666 | 0 | 0 | 16,457 |
392,624 | 2008-12-25T08:25:00.000 | 18 | 1 | 1 | 1 | c#,java,python,networking | 392,911 | 15 | false | 0 | 0 | I might be going slightly off-topic here, but the topic interests me as I have (hobby-wise) worked on quite a few game servers (MMORPG servers) - on others' code as well as mine. There is literature out there that will be of interest to you, drop me a note if you want some references.
One thing that strikes me in your ... | 9 | 15 | 0 | I was just wondering what language would be a good choice for developing a game server to support a large (thousands) number of users? I dabbled in python, but realized that it would just be too much trouble since it doesn't spawn threads across cores (meaning an 8 core server=1 core server). I also didn't really like ... | Good language to develop a game server in? | 1 | 0 | 0 | 16,457 |
392,624 | 2008-12-25T08:25:00.000 | 7 | 1 | 1 | 1 | c#,java,python,networking | 392,650 | 15 | false | 0 | 0 | What kind of performance do you need?
twisted is great for servers that need lots of concurrency, as is erlang. Either supports massive concurrency easily and has facilities for distributed computing.
If you want to span more than one core in a python app, do the same thing you'd do if you wanted to span more than one... | 9 | 15 | 0 | I was just wondering what language would be a good choice for developing a game server to support a large (thousands) number of users? I dabbled in python, but realized that it would just be too much trouble since it doesn't spawn threads across cores (meaning an 8 core server=1 core server). I also didn't really like ... | Good language to develop a game server in? | 1 | 0 | 0 | 16,457 |
392,624 | 2008-12-25T08:25:00.000 | 21 | 1 | 1 | 1 | c#,java,python,networking | 392,627 | 15 | false | 0 | 0 | I hate to say it, and I know I'm risking a down mod here, but it doesn't sound like there's a language out there for you. All programming languages have their quirks and programmers simply have to adapt to them. It's completely possible to write a working server in Python without classes (eliminating the "self" variabl... | 9 | 15 | 0 | I was just wondering what language would be a good choice for developing a game server to support a large (thousands) number of users? I dabbled in python, but realized that it would just be too much trouble since it doesn't spawn threads across cores (meaning an 8 core server=1 core server). I also didn't really like ... | Good language to develop a game server in? | 1 | 0 | 0 | 16,457 |
392,624 | 2008-12-25T08:25:00.000 | 2 | 1 | 1 | 1 | c#,java,python,networking | 392,844 | 15 | false | 0 | 0 | The obvious candidates are Java and Erlang:
Pro Java:
ease of development
good development environments
stability, good stack traces
well-known (easy to find experienced programmers, lots of libraries, books, ...)
quite fast, mature VM
Pro Erlang:
proven in systems that need >99.9% uptime
ability to have software up... | 9 | 15 | 0 | I was just wondering what language would be a good choice for developing a game server to support a large (thousands) number of users? I dabbled in python, but realized that it would just be too much trouble since it doesn't spawn threads across cores (meaning an 8 core server=1 core server). I also didn't really like ... | Good language to develop a game server in? | 0.02666 | 0 | 0 | 16,457 |
392,784 | 2008-12-25T12:40:00.000 | 0 | 0 | 0 | 0 | python,django,django-forms,django-templates | 392,849 | 3 | false | 1 | 0 | If the two forms are completely different, it will certainly not hurt to have them be handled by two different views. Otherwise, you may use the 'hidden input element' trick zacherates has touched upon. Or, you could always give each submit element a unique name, and differentiate in the view which form was submitted b... | 1 | 5 | 0 | I have two completely different forms in one template. How to process them in one view? How can I distinguish which of the forms was submitted? How can I use prefix to acomplish that? Or maybe it's better to write separate views?
regards
chriss | How to process two forms in one view? | 0 | 0 | 0 | 7,720 |
393,629 | 2008-12-26T08:49:00.000 | 13 | 0 | 0 | 0 | python,django,fastcgi | 393,636 | 2 | true | 1 | 0 | Let's start with the definition
maxrequests: How many requests does a child server before being killed
and a new one forked
maxspare : Maximum number of spare processes to keep running
minspare : Minimum number of spare processes to prefork
maxchildren: Hard limit number of proces... | 2 | 6 | 0 | I'm running a Django app using FastCGI and lighttpd.
Can somebody explain me what I should consider when deciding what value to use for maxrequests, maxspare, minspare, maxchildren?
These options are not too well documented, but seem quite important.
Don't just tell me what they do; I want to understand what implicatio... | What values to use for FastCGI maxrequests, maxspare, minspare, maxchildren? | 1.2 | 0 | 0 | 5,068 |
393,629 | 2008-12-26T08:49:00.000 | -1 | 0 | 0 | 0 | python,django,fastcgi | 393,649 | 2 | false | 1 | 0 | Don't forget to coordinate your fcgi settings with your apache worker settings. I usually keep more apache workers around than fcgi workers... they are lighter weight and will wait for an available fcgi worker to free up to process the request if the concurrency reaches higher than my maxspare. | 2 | 6 | 0 | I'm running a Django app using FastCGI and lighttpd.
Can somebody explain me what I should consider when deciding what value to use for maxrequests, maxspare, minspare, maxchildren?
These options are not too well documented, but seem quite important.
Don't just tell me what they do; I want to understand what implicatio... | What values to use for FastCGI maxrequests, maxspare, minspare, maxchildren? | -0.099668 | 0 | 0 | 5,068 |
394,465 | 2008-12-26T23:35:00.000 | 14 | 0 | 0 | 0 | python,mod-wsgi | 1,038,071 | 2 | false | 1 | 0 | Be aware that technically speaking calling read() or read(-1) on wsgi.input is a violation of the WSGI specification even though Apache/mod_wsgi allows it. This is because the WSGI specification requires that a valid length argument be supplied. The WSGI specification also says you shouldn't read more data than is spec... | 1 | 15 | 0 | This must be a very simple question, but I don't seem to be able to figure out.
I'm using apache + mod_wsgi to host my python application, and I'd like to get the post content submitted in one of the forms -however, neither the environment values, nor sys.stdin contains any of this data. Mind giving me a quick hand?
Ed... | Python POST data using mod_wsgi | 1 | 0 | 0 | 12,755 |
394,500 | 2008-12-27T00:25:00.000 | 1 | 0 | 1 | 1 | python | 394,548 | 4 | false | 0 | 0 | I think there is something wrong in the design if you already have a file-like object if you want your data to end up in the subprocess. You should then arrange that they get written into the subprocess in the first place, rather than having them written into something else file-like first. Whoever is writing the data ... | 1 | 3 | 0 | In the python program I'm writing, I've got a thread which iterates over a large structure in memory and writes it incrementally into a file-like object. I've got another thread which takes a file-like object and writes it to disk. Is there an easy way to connect the two, such that any data input from the first threa... | Is there a simple way in Python to create a file which can be written to in one thread and read in a different one? | 0.049958 | 0 | 0 | 490 |
395,846 | 2008-12-28T04:52:00.000 | 0 | 0 | 0 | 0 | python,sockets,ethernet,arp | 503,144 | 2 | false | 0 | 0 | You could use the OpenVPN tap to send arbitrary packets as if you where using raw sockets. | 1 | 3 | 0 | Is there any way to send ARP packet on Windows without the use of another library such as winpcap?
I have heard that Windows XP SP2 blocks raw ethernet sockets, but I have also heard that raw sockets are only blocked for administrators. Any clarification here? | How do I send an ARP packet through python on windows without needing winpcap? | 0 | 0 | 1 | 4,899 |
395,960 | 2008-12-28T07:56:00.000 | 1 | 1 | 0 | 0 | php,python | 397,669 | 5 | false | 1 | 0 | Python web-apps tend to require more initial setup and development than the equivalent PHP site (particularly so for small sites). There also tend to be more reusable pieces for PHP (ie Wordpress as a blog). Configuring a server to run Python web-apps can be a difficult process, and not always well documented. PHP t... | 3 | 5 | 0 | For those of you who have had the opportunity of writing web applications in PHP and then as an application server (eg. Python-based solutions like CherryPy or Pylons), in what context are application servers a better alternative to PHP?
I tend to favor PHP simply because it's available on just about any web server (es... | PHP vs. application server? | 0.039979 | 0 | 0 | 1,413 |
395,960 | 2008-12-28T07:56:00.000 | 0 | 1 | 0 | 0 | php,python | 396,717 | 5 | false | 1 | 0 | Using application servers like Pylons, Django, etc. require much more work to setup and deploy then PHP applications which are generally supported out of the box. I run a few Django apps and had to learn a bit of configuring apache with mod_python in order to get things to work. I put forth the effort because coding in... | 3 | 5 | 0 | For those of you who have had the opportunity of writing web applications in PHP and then as an application server (eg. Python-based solutions like CherryPy or Pylons), in what context are application servers a better alternative to PHP?
I tend to favor PHP simply because it's available on just about any web server (es... | PHP vs. application server? | 0 | 0 | 0 | 1,413 |
395,960 | 2008-12-28T07:56:00.000 | 5 | 1 | 0 | 0 | php,python | 397,730 | 5 | false | 1 | 0 | I have a feeling that some of the responses didn't address the initial question directly, so I decided to post my own. I understand that the question was about the difference between the mod_php deployment model and the application server deployment model.
In simple words, PHP executes a given script on every request, ... | 3 | 5 | 0 | For those of you who have had the opportunity of writing web applications in PHP and then as an application server (eg. Python-based solutions like CherryPy or Pylons), in what context are application servers a better alternative to PHP?
I tend to favor PHP simply because it's available on just about any web server (es... | PHP vs. application server? | 0.197375 | 0 | 0 | 1,413 |
396,455 | 2008-12-28T17:51:00.000 | -1 | 0 | 0 | 0 | python,postgresql,database,psycopg | 675,865 | 4 | false | 0 | 0 | using a MERGE statement instead of an INSERT one would solve your problem. | 2 | 6 | 0 | I am currently analyzing a wikipedia dump file; I am extracting a bunch of data from it using python and persisting it into a PostgreSQL db. I am always trying to make things go faster for this file is huge (18GB). In order to interface with PostgreSQL, I am using psycopg2, but this module seems to mimic many other suc... | Python-PostgreSQL psycopg2 interface --> executemany | -0.049958 | 1 | 0 | 7,742 |
396,455 | 2008-12-28T17:51:00.000 | 0 | 0 | 0 | 0 | python,postgresql,database,psycopg | 396,824 | 4 | false | 0 | 0 | "When my script detects such a non-UNIQUE INSERT, it connection.rollback() (which makes ups to 1000 rows everytime, and kind of makes the executemany worthless) and then INSERTs all values one by one."
The question doesn't really make a lot of sense.
Does EVERY block of 1,000 rows fail due to non-unique rows?
Does 1 b... | 2 | 6 | 0 | I am currently analyzing a wikipedia dump file; I am extracting a bunch of data from it using python and persisting it into a PostgreSQL db. I am always trying to make things go faster for this file is huge (18GB). In order to interface with PostgreSQL, I am using psycopg2, but this module seems to mimic many other suc... | Python-PostgreSQL psycopg2 interface --> executemany | 0 | 1 | 0 | 7,742 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.