Title stringlengths 11 150 | A_Id int64 518 72.5M | Users Score int64 -42 283 | Q_Score int64 0 1.39k | ViewCount int64 17 1.71M | Database and SQL int64 0 1 | Tags stringlengths 6 105 | Answer stringlengths 14 4.78k | GUI and Desktop Applications int64 0 1 | System Administration and DevOps int64 0 1 | Networking and APIs int64 0 1 | Other int64 0 1 | CreationDate stringlengths 23 23 | AnswerCount int64 1 55 | Score float64 -1 1.2 | is_accepted bool 2
classes | Q_Id int64 469 42.4M | Python Basics and Environment int64 0 1 | Data Science and Machine Learning int64 0 1 | Web Development int64 1 1 | Available Count int64 1 15 | Question stringlengths 17 21k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
multi threading python/ruby vs java? | 2,965,919 | 9 | 2 | 5,035 | 0 | java,python,ruby | This is not a question about Ruby, Python or Java, but more about a specific implementation of Ruby, Python or Java. There are Java implementations with extremely efficient threading implementations and there are Java implementations with extremely bad threading implementations. And the same is true for Ruby and Python... | 0 | 0 | 0 | 0 | 2010-06-03T05:59:00.000 | 3 | 1.2 | true | 2,963,615 | 1 | 0 | 1 | 2 | i wonder if the multi threading in python/ruby is equivalent to the one in java?
by that i mean, is it as efficient?
cause if you want to create a chat application that use comet technology i know that you have to use multi threading.
does this mean that i can use python or ruby for that or is it better with java?
than... |
multi threading python/ruby vs java? | 2,966,837 | 1 | 2 | 5,035 | 0 | java,python,ruby | philosodad is not wrong to point out the constraint that the GIL presents. I won't speak for Ruby, but I am sure that it's safe to assume that when you refer to Python that you are in fact referring to the canonical cPython implementation.
In the case of cPython, the GIL matters most if you want to parallelize compu... | 0 | 0 | 0 | 0 | 2010-06-03T05:59:00.000 | 3 | 0.066568 | false | 2,963,615 | 1 | 0 | 1 | 2 | i wonder if the multi threading in python/ruby is equivalent to the one in java?
by that i mean, is it as efficient?
cause if you want to create a chat application that use comet technology i know that you have to use multi threading.
does this mean that i can use python or ruby for that or is it better with java?
than... |
php equivalent to jython? | 2,968,495 | 1 | 4 | 494 | 0 | java,php,python,jython | Well: Java Server Pages (JSP) are "equivalent" to PHP, but using java classes.
It's "equivalent" in that it's HTML with embedded java code, but not at all compatible to PHP syntax. | 0 | 0 | 0 | 1 | 2010-06-03T17:35:00.000 | 5 | 0.039979 | false | 2,968,381 | 0 | 0 | 1 | 2 | i wonder if there is a php equivalent to jython so you can use java classes with php?
thanks |
php equivalent to jython? | 2,968,418 | 1 | 4 | 494 | 0 | java,php,python,jython | I just googled php jvm and got a bunch of hits. Never tried any of them. | 0 | 0 | 0 | 1 | 2010-06-03T17:35:00.000 | 5 | 0.039979 | false | 2,968,381 | 0 | 0 | 1 | 2 | i wonder if there is a php equivalent to jython so you can use java classes with php?
thanks |
How to deal with "partial" dates (2010-00-00) from MySQL in Django? | 3,027,410 | 7 | 8 | 4,080 | 1 | python,mysql,database,django,date | First, thanks for all your answers. None of them, as is, was a good solution for my problem, but, for your defense, I should add that I didn't give all the requirements. But each one help me think about my problem and some of your ideas are part of my final solution.
So my final solution, on the DB side, is to use a va... | 0 | 0 | 0 | 0 | 2010-06-04T02:49:00.000 | 5 | 1.2 | true | 2,971,198 | 0 | 0 | 1 | 1 | In one of my Django projects that use MySQL as the database, I need to have a date fields that accept also "partial" dates like only year (YYYY) and year and month (YYYY-MM) plus normal date (YYYY-MM-DD).
The date field in MySQL can deal with that by accepting 00 for the month and the day. So 2010-00-00 is valid in MyS... |
django and netbeans? | 2,971,775 | 0 | 10 | 19,247 | 0 | python,django,netbeans,ide | Netbeans doesn't have a django plugin that I know of. Eclipse's pydev plugin is decent, I typically use any ol' editor and bpython.
I've heard great things about wingware and intellij's new python ide is pretty good. | 0 | 0 | 0 | 0 | 2010-06-04T03:25:00.000 | 3 | 0 | false | 2,971,309 | 0 | 0 | 1 | 1 | I use netbeans for all of my Linux development (C/C++, Php, Python, Symfony). I am now learning django, and wondered if I could use netbeans as the IDE. I cant seem to find a Django plugin for netbeans.
Is there one?. If no when is one planned?
Worst case scenario, I'll have to use another IDE (I really dont want to le... |
Django chat with ajax polling | 2,973,756 | 0 | 2 | 3,357 | 0 | python,ajax,django,comet,chat | ajax is the best here
what you will need:
1) server view that will return recent messages
2) client-side caller by timer (I prefer jQuery and its timers plugin) and success handler, that will populate the chat window | 0 | 0 | 0 | 0 | 2010-06-04T11:21:00.000 | 2 | 0 | false | 2,973,591 | 0 | 0 | 1 | 1 | I need to create a chat similar to facebook chat.
I am thinking to create a simple application Chat and then using ajax polling ( to send request every 2-3 seconds ).
Is this a good approach ? |
Proper way to define "remaining time off" for a Django User | 2,978,805 | 2 | 1 | 218 | 0 | python,django,user-profile | If you do not want to modify/inherit from the original User model I'd say it's totally ok if the method is added to your UserProfile! | 0 | 0 | 0 | 0 | 2010-06-04T21:11:00.000 | 2 | 0.197375 | false | 2,977,824 | 0 | 0 | 1 | 1 | I've implemented a UserProfile model (as the Django 1.2 docs say is the proper way to save additional data about a User) which has a 'remaining_vacation_hours' field.
In our current system, when a user fills out a Time Off Request, the remaining hours available should be checked to see that they have enough vacation t... |
Anyone using IronPython in a production application? | 3,000,668 | 3 | 5 | 1,311 | 0 | ironpython | I'm doing web development for a German firm using Django on the server side and Silverlight with IronPython on the client. We're an all Python development company so being able to do "full stack" development with Python is great (although it was originally the customer who specified Silverlight). | 0 | 0 | 0 | 0 | 2010-06-05T06:20:00.000 | 3 | 0.197375 | false | 2,979,402 | 0 | 0 | 1 | 1 | I've been toying with the idea of adding IronPython for extending a scientific application I support.
Is this a good or horrible idea?
Are there any good examples of IronPython being used in a production application. I've seen Resolver, which is kind of cute. Are there any other apps out there?
What I don't get is ... |
Django admin add page, how to, autofill with latest data(0002)+1=0003 | 2,982,717 | 1 | 1 | 165 | 0 | python,django,admin | Not reliably. What will happen if multiple people access it at the same time is that data will be overwritten. Let the PK serve its purpose, behind the scenes. | 0 | 0 | 0 | 0 | 2010-06-06T00:52:00.000 | 1 | 0.197375 | false | 2,982,708 | 0 | 0 | 1 | 1 | When adding a new data, can we automatically add a dynamic default data where the value is previous recorded data(0002)+1=0003 |
Getting logging.debug() to work on Google App Engine/Python | 17,550,812 | 8 | 25 | 7,359 | 0 | python,debugging,google-app-engine | In case someone is using the Windows Google Application Launcher. The argument for debug can be set under Edit > Application Settings
In the Extra Command Line Flags, add --log_level=debug | 0 | 1 | 0 | 0 | 2010-06-06T03:01:00.000 | 4 | 1 | false | 2,982,959 | 0 | 0 | 1 | 2 | I'm just getting started on building a Python app for Google App Engine. In the localhost environment (on a Mac)
I'm trying to send debug info to the GoogleAppEngineLauncher Log Console via logging.debug(), but it isn't showing up. However, anything sent through, say, logging.info() or logging.error() does show up. ... |
Getting logging.debug() to work on Google App Engine/Python | 27,547,085 | 1 | 25 | 7,359 | 0 | python,debugging,google-app-engine | On a Mac:
1) click Edit > Application Settings
2) then copy and paste the following line into the "Extra Flags:" field
--log_level=debug
3) click Update
your debug logs will now show up in the Log Console | 0 | 1 | 0 | 0 | 2010-06-06T03:01:00.000 | 4 | 0.049958 | false | 2,982,959 | 0 | 0 | 1 | 2 | I'm just getting started on building a Python app for Google App Engine. In the localhost environment (on a Mac)
I'm trying to send debug info to the GoogleAppEngineLauncher Log Console via logging.debug(), but it isn't showing up. However, anything sent through, say, logging.info() or logging.error() does show up. ... |
Talking to an Authentication Server | 2,986,411 | 1 | 0 | 308 | 0 | python,authentication,rest | Assuming you plan to write your own auth client code, it isn't event-driven, and you don't need to validate an https certificate, I would suggest using python's built-in urllib2 to call the auth server. This will minimize dependencies, which ought to make deployment and upgrades easier.
That being said, there are more... | 0 | 0 | 1 | 0 | 2010-06-06T23:14:00.000 | 3 | 0.066568 | false | 2,986,317 | 0 | 0 | 1 | 2 | I'm building my startup and I'm thinking ahead for shared use of services.
So far I want to allow people who have a user account on one app to be able to use the same user account on another app. This means I will have to build an authentication server.
I would like some opinions on how to allow an app to talk to the a... |
Talking to an Authentication Server | 2,986,610 | 0 | 0 | 308 | 0 | python,authentication,rest | Your question isn't really a programming problem so much as it is an architecture problem. What I would recommend for your specific situation is to setup an LDAP server for authentication, authorization, and accounting (AAA). Then have your applications use that (every language has modules and libraries for LDAP). I... | 0 | 0 | 1 | 0 | 2010-06-06T23:14:00.000 | 3 | 0 | false | 2,986,317 | 0 | 0 | 1 | 2 | I'm building my startup and I'm thinking ahead for shared use of services.
So far I want to allow people who have a user account on one app to be able to use the same user account on another app. This means I will have to build an authentication server.
I would like some opinions on how to allow an app to talk to the a... |
django app organization | 2,987,352 | 8 | 6 | 1,802 | 0 | python,django | First, large files are pretty common in python. Python is not java, which has one class per file, rather one module per file.
Next, views, even as the standard used, is a python module. A module need not be a single file. It can be a directory containing many files, and __init__.py
And then, views.py is only a conventi... | 0 | 0 | 0 | 0 | 2010-06-07T01:44:00.000 | 3 | 1.2 | true | 2,986,659 | 0 | 0 | 1 | 2 | I have been reading some django tutorial and it seems like all the view functions have to go in a file called "views.py" and all the models go in "models.py". I fear that I might end up with a lot of view functions in my view.py file and the same is the case with models.py.
Is my understanding of django apps correct?
... |
django app organization | 2,986,813 | 1 | 6 | 1,802 | 0 | python,django | They don't have to go in views.py. They have to be referenced there.
views.py can include other files. So, if you feel the need, you can create other files in one app that contain your view functions and just include them in views.py.
The same applies to models.py.
Django apps lets us separate common
functionality i... | 0 | 0 | 0 | 0 | 2010-06-07T01:44:00.000 | 3 | 0.066568 | false | 2,986,659 | 0 | 0 | 1 | 2 | I have been reading some django tutorial and it seems like all the view functions have to go in a file called "views.py" and all the models go in "models.py". I fear that I might end up with a lot of view functions in my view.py file and the same is the case with models.py.
Is my understanding of django apps correct?
... |
what should i do after openid (or twitter ,facebook) user login my site ,on gae | 2,988,807 | 1 | 0 | 264 | 0 | python,google-app-engine,openid,integration | I understand your question.
You wish to be able to maintain a list of users that have signed up with your service, and also want to record users using OpenID to authenticate.
In order to solve this I would do either of the following:
Create a new user in your users table for each new user logged in under OpenID, and s... | 0 | 1 | 0 | 0 | 2010-06-07T02:24:00.000 | 1 | 0.197375 | false | 2,986,766 | 0 | 0 | 1 | 1 | how to integration local user and openid(or facebook twitter) user ,
did you know some framework have already done this ,
updated
my mean is : how to deal with 'local user' and 'openid user',
and how to mix them in one model .
please give me a framework that realize 'local user' and 'openid user' |
Read -> change -> save. Thread safe | 2,989,839 | 0 | 0 | 249 | 0 | python,google-app-engine,thread-safety | memcache is 'just' a cache, and in its usual guise it's not suitable for an atomic data store, which is what you're trying to use it for. I'd suggest using the GAE datastore instead, which is designed for this sort of issue. | 0 | 0 | 0 | 0 | 2010-06-07T06:18:00.000 | 4 | 0 | false | 2,987,429 | 0 | 0 | 1 | 1 | This code should automatically connect players when they enter a game.
But the problem is when two users try to connect at the same time - in this case 2nd user can easily overwrite changes made by 1st user ('room_1' variable).
How could I make it thread safe?
def join(userId):
users = memcache.get('room_1')
... |
Avoid 404 page override | 2,998,022 | 0 | 0 | 87 | 0 | python,django | Within the templates folder, there is should be a 404.html. Remove that, and django defaults to the standard 404 page! | 0 | 0 | 0 | 0 | 2010-06-08T13:39:00.000 | 1 | 0 | false | 2,997,764 | 0 | 0 | 1 | 1 | I 'm using django-lfs with default django-app.Its appear django-lfs override 404 default template. How to avoid this process |
what is the recommended way of running a embedded web server within a desktop app (say wsgi server with pyqt) | 3,003,086 | 6 | 6 | 2,601 | 0 | python,user-interface,desktop,pyqt,wsgi | Use something like CherryPy or paste.httpserver. You can use wsgiref's server, and it generally works okay locally, but if you are doing Ajax the single-threaded nature of wsgiref can cause some odd results, or if you ever do a subrequest you'll get a race condition. But for most cases it'll be fine. It might be use... | 0 | 0 | 0 | 0 | 2010-06-08T20:50:00.000 | 3 | 1.2 | true | 3,001,185 | 0 | 0 | 1 | 1 | The desktop app should start the web server on launch and should shut it down on close.
Assuming that the desktop is the only client allowed to connect to the web server, what is the best way to write this?
Both the web server and the desktop run in a blocking loop of their own. So, should I be using threads or multip... |
Fetching a random record from the Google App Engine Datastore? | 3,003,170 | 23 | 21 | 5,002 | 0 | python,google-app-engine,google-cloud-datastore | Assign each entity a random number and store it in the entity. Then query for ten records whose random number is greater than (or less than) some other random number.
This isn't totally random, however, since entities with nearby random numbers will tend to show up together. If you want to beat this, do ten queries bas... | 0 | 1 | 0 | 0 | 2010-06-09T03:55:00.000 | 2 | 1.2 | true | 3,002,999 | 0 | 0 | 1 | 1 | I have a datastore with around 1,000,000 entities in a model. I want to fetch 10 random entities from this.
I am not sure how to do this? can someone help? |
Is there a way to set a fixed width for the characters in HTML? | 3,005,405 | 3 | 2 | 396 | 0 | python,pyqt4,qtextedit | What you're asking for is called a fixed-width font. As James Hopkin remarked, HTML text in <tt> or <pre> tags is rendered with a fixed-width font.
However, what you describe sounds like a table. HTML has direct support for that, with <table>, <tr> (row) and <td> (data/cell). Don't bother with fixed-width fonts; just ... | 0 | 0 | 0 | 0 | 2010-06-09T10:45:00.000 | 2 | 1.2 | true | 3,005,063 | 0 | 0 | 1 | 2 | Is there a way to set a fix size for the characters in HTML?
That means, say …
First row, 8th character is “Z”
Second row’s 8th character is “A”
I want to print out , when printed the “Z” has to be exactly on top of “A”
*Note: I'm using the insertHtml method in QTextEdit() |
Is there a way to set a fixed width for the characters in HTML? | 3,005,297 | 0 | 2 | 396 | 0 | python,pyqt4,qtextedit | Put the text in <tt> tags (or <pre> around a whole paragraph of text). | 0 | 0 | 0 | 0 | 2010-06-09T10:45:00.000 | 2 | 0 | false | 3,005,063 | 0 | 0 | 1 | 2 | Is there a way to set a fix size for the characters in HTML?
That means, say …
First row, 8th character is “Z”
Second row’s 8th character is “A”
I want to print out , when printed the “Z” has to be exactly on top of “A”
*Note: I'm using the insertHtml method in QTextEdit() |
Create event for another owner using Facebook Graph API | 6,583,766 | 0 | 1 | 700 | 0 | python,django,facebook | This is possible, using the access token provided for your page you can publish to this as you would with a user. If you want to post FROM the USER than you need to use the current user's access token, if you want to post FROM the PAGE then using the access token from the page you can publish to that | 0 | 0 | 1 | 0 | 2010-06-09T12:12:00.000 | 1 | 0 | false | 3,005,640 | 0 | 0 | 1 | 1 | I'm at the moment working on a web page where the users who visit it should have the possibility to create an event in my web page's name. There is a Page on Facebook for the web page which should be the owner of the user created event. Is this possible? All users are authenticated using Facebook Connect, but since the... |
Python version 2.6 required, which was not found in the registry | 13,910,180 | 0 | 57 | 72,470 | 0 | python,installation | maybe your installer is i386 and your computer is AMD64. try to find the right package! | 0 | 0 | 0 | 0 | 2010-06-09T18:01:00.000 | 9 | 0 | false | 3,008,509 | 1 | 0 | 1 | 3 | Can't download any python Windows modules and install. I wanted to experiment with scrapy framework and stackless but unable to install due to error "Python version 2.6 required, which was not found in the registry".
Trying to install it to
Windows 7, 64 bit machine |
Python version 2.6 required, which was not found in the registry | 8,712,435 | 21 | 57 | 72,470 | 0 | python,installation | For me this happens on a 32 bit system with activepython installed.
It seams that the regs are not in HKEY_CURRENT_USER so here is what I do to fix that.
Export the "Python" section under HKEY_LOCAL_MACHINE -> Software
Open the export in notepad notepad. Replace "LOCAL_MACHINE" with "CURRENT_USER"
Since I have 2.7 ins... | 0 | 0 | 0 | 0 | 2010-06-09T18:01:00.000 | 9 | 1 | false | 3,008,509 | 1 | 0 | 1 | 3 | Can't download any python Windows modules and install. I wanted to experiment with scrapy framework and stackless but unable to install due to error "Python version 2.6 required, which was not found in the registry".
Trying to install it to
Windows 7, 64 bit machine |
Python version 2.6 required, which was not found in the registry | 7,170,483 | 80 | 57 | 72,470 | 0 | python,installation | I realize this question is a year old - but I thought I would contribute one additional bit of info in case anyone else is Googling for this answer.
The issue only crops up on Win7 64-bit when you install Python "for all users". If you install it "for just me", you should not receive these errors. It seems that a lot o... | 0 | 0 | 0 | 0 | 2010-06-09T18:01:00.000 | 9 | 1 | false | 3,008,509 | 1 | 0 | 1 | 3 | Can't download any python Windows modules and install. I wanted to experiment with scrapy framework and stackless but unable to install due to error "Python version 2.6 required, which was not found in the registry".
Trying to install it to
Windows 7, 64 bit machine |
how to make a chat room on gae ,has any audio python-framework to do this? | 3,020,384 | 0 | 0 | 749 | 0 | python,google-app-engine,audio,chat | You'll need two things:
A browser plugin to get audio. You could build this on top of eg. http://code.google.com/p/libjingle/'>libjingle which has the advantage of being cross-platform and allowing P2P communication, not to mention being able to talk to arbitrary other XMPP endoints. Or you could use Flash to grab the ... | 0 | 1 | 0 | 0 | 2010-06-10T08:07:00.000 | 4 | 0 | false | 3,012,661 | 0 | 0 | 1 | 3 | i want to make a chat room on gae ,(audio chat)
has any framework to do this ?
thanks |
how to make a chat room on gae ,has any audio python-framework to do this? | 3,080,160 | 1 | 0 | 749 | 0 | python,google-app-engine,audio,chat | Try Adobe Stratus (it works with p2p connections) and you could use Google App Engine only for exchanging peer ids. | 0 | 1 | 0 | 0 | 2010-06-10T08:07:00.000 | 4 | 0.049958 | false | 3,012,661 | 0 | 0 | 1 | 3 | i want to make a chat room on gae ,(audio chat)
has any framework to do this ?
thanks |
how to make a chat room on gae ,has any audio python-framework to do this? | 3,013,054 | 1 | 0 | 749 | 0 | python,google-app-engine,audio,chat | App Engine doesn't directly support audio chat of any sort, and since it's based around a request-response system with (primarily) HTTP requests, you can't implement it yourself. | 0 | 1 | 0 | 0 | 2010-06-10T08:07:00.000 | 4 | 1.2 | true | 3,012,661 | 0 | 0 | 1 | 3 | i want to make a chat room on gae ,(audio chat)
has any framework to do this ?
thanks |
How do Django signals work? | 3,012,925 | 18 | 5 | 2,048 | 0 | python,django,signals | Django signals are synchronous. The handlers are executed as soon as the signal is fired, and control returns only when all appropriate handlers have finished. | 0 | 0 | 0 | 0 | 2010-06-10T08:40:00.000 | 2 | 1.2 | true | 3,012,863 | 0 | 0 | 1 | 1 | How does Django's event routing system work? |
Sequence and merge jpeg images using Python? | 3,013,162 | 2 | 1 | 634 | 0 | python,linux,pdf,merge,jpeg | Not exactly knowing what you mean my sequence - ImageMagick, esp. its 'montage' is probably the tool you need. IM has python interface, too, altough I have never used it.
EDIT: As after your edit I do not get the point of this any more, I cannot recommend anything, either. :( | 0 | 0 | 0 | 0 | 2010-06-10T09:21:00.000 | 1 | 0.379949 | false | 3,013,134 | 0 | 0 | 1 | 1 | im doing a project as part of academic programme.Im doing this in linux platform.here i wanted to create a application which retrieve some information from some pdf files .for eg i have pdfs of subject2,subject1,in both the whole pdf is divided in to 4 modules and i want to get the data of module 1 from pdf..for this ... |
Editing django code within django - Django | 3,015,914 | 3 | 1 | 135 | 0 | python,django | Providing an editing interface is one half of the battle but it's pretty straightforward. There are already apps out there to provide editing of templates and media files so it's pretty much just an extension of that.
The hardest part is restarting the server which would have to happen in order for the new code to be c... | 0 | 0 | 0 | 0 | 2010-06-10T15:24:00.000 | 2 | 0.291313 | false | 3,015,825 | 0 | 0 | 1 | 1 | just wondering if it would be possible in some experimental way, to edit django app code within django safely to then refresh the compiled files.
Would be great if someone has tried something similar already or has some ideas.
I would like to be able to edit small bits of code from a web interface, so I can easily main... |
Fast Esp Custom Stage Development | 3,421,127 | 0 | 0 | 816 | 0 | python,stage,fast-esp | The FAST documentation (ESP Document Processor Integration Guide) has a pretty good example of how to write a custom document processor. FAST does not provide the source code to any of it's software, but the AttributeFilter stage functionality should be very straightforward. | 0 | 0 | 0 | 0 | 2010-06-10T15:31:00.000 | 2 | 1.2 | true | 3,015,874 | 1 | 0 | 1 | 2 | I am working on Enterprise Search and we are using Fast ESP and for now i have 4 projects but i have no information about stages and python. But i realize that i have learn custom stage development. Because we have a lot of difficulties about document processing. I want to know how can i develop custom stage and especi... |
Fast Esp Custom Stage Development | 47,027,134 | 0 | 0 | 816 | 0 | python,stage,fast-esp | I had worked with FAST ESP for document processing and we used to modify the python files. you can modify them but you need to restart the document processor each time you modify any file. You need to search for document processing in the admin UI, there you go to the pipelines, and you can create a custom pipeline bas... | 0 | 0 | 0 | 0 | 2010-06-10T15:31:00.000 | 2 | 0 | false | 3,015,874 | 1 | 0 | 1 | 2 | I am working on Enterprise Search and we are using Fast ESP and for now i have 4 projects but i have no information about stages and python. But i realize that i have learn custom stage development. Because we have a lot of difficulties about document processing. I want to know how can i develop custom stage and especi... |
How exactly does a python (django) request happen? does it have to reparse all the codebase? | 3,018,777 | 5 | 2 | 207 | 0 | python,django,pipeline,request-pipeline | With a scripting language like python
(or php), things are not compiled down
to bytecode like in .net or java.
Wrong: everything you import in Python gets compiled to bytecode (and saved as .pyc files if you can write to the directory containing the source you're importing -- standard libraries &c are generally pr... | 0 | 0 | 0 | 0 | 2010-06-10T21:32:00.000 | 2 | 1.2 | true | 3,018,690 | 0 | 0 | 1 | 2 | With a scripting language like python (or php), things are not compiled down to bytecode like in .net or java.
So does this mean that on every request, it has to go through the entire application and parse/compile it? Or at least all the code required for the given call stack? |
How exactly does a python (django) request happen? does it have to reparse all the codebase? | 3,018,704 | 3 | 2 | 207 | 0 | python,django,pipeline,request-pipeline | When running as CGI, yes, the entire project needs to be loaded for each request. FastCGI and mod_wsgi keep the project in memory and talk to it over a socket. | 0 | 0 | 0 | 0 | 2010-06-10T21:32:00.000 | 2 | 0.291313 | false | 3,018,690 | 0 | 0 | 1 | 2 | With a scripting language like python (or php), things are not compiled down to bytecode like in .net or java.
So does this mean that on every request, it has to go through the entire application and parse/compile it? Or at least all the code required for the given call stack? |
wav file manupalation | 3,021,073 | 0 | 1 | 660 | 0 | python,wav | NumPy can load the data into arrays for easy manipulation. Or SciPy. I forget which. | 1 | 0 | 0 | 0 | 2010-06-11T07:45:00.000 | 3 | 0 | false | 3,021,046 | 0 | 0 | 1 | 1 | I want get the details of the wave such as its frames into a array of integers.
Using fname.getframes we can ge the properties of the frame and save in list or anything for writing into another wav or anything,but fname.getframes gives information not in integers some thing like a "/xt/x4/0w' etc..
But i want them in i... |
Web application architecture, and application servers? | 3,022,395 | 2 | 3 | 1,161 | 1 | php,python,model-view-controller,cakephp,application-server | How do go about implementing this?
Too big a question for an answer here. Certainly you don't want 2 sets of code for the scraping (1 for scheduled, 1 for demand) in addition to the added complication, you really don't want to be running job which will take an indefinite time to complete within the thread generated b... | 0 | 0 | 0 | 0 | 2010-06-11T10:12:00.000 | 2 | 1.2 | true | 3,021,921 | 0 | 0 | 1 | 1 | I'm building a web application, and I need to use an architecture that allows me to run it over two servers. The application scrapes information from other sites periodically, and on input from the end user. To do this I'm using Php+curl to scrape the information, Php or python to parse it and store the results in a M... |
How to merge or copy anonymous session data into user data when user logs in? | 3,024,470 | 1 | 0 | 140 | 0 | python,session,e-commerce,web.py | If very much depends on your system ofcourse. But personally I always try to merge the data and immediately store it in the same way as it would be stored as when the user would be logged in.
So if you store it in a session for an anonymous user and in the database for any authenticated user. Just merge all data as soo... | 0 | 0 | 0 | 0 | 2010-06-11T15:44:00.000 | 1 | 0.197375 | false | 3,024,191 | 0 | 0 | 1 | 1 | This is a general question, or perhaps a request for pointers to other open source projects to look at:
I'm wondering how people merge an anonymous user's session data into the authenticated user data when a user logs in. For example, someone is browsing around your websites saving various items as favourites. He's not... |
Google App Engine - update_indexes error | 3,025,435 | 1 | 1 | 221 | 0 | java,python,google-app-engine,google-cloud-datastore | I followed what was suggested in the error logs and that worked for me:
Empty the index.yaml file (create a backup first)
Run vacuum_indexes again
Look at your app's admin console and don't go to the next step till all your indexes are deleted.
Specify the indexes you want to be created in index.yaml
Run update_indexe... | 0 | 1 | 0 | 0 | 2010-06-11T16:55:00.000 | 1 | 0.197375 | false | 3,024,663 | 0 | 0 | 1 | 1 | I have a Java app deployed on app engine and I use appcfg.py of the
Python SDK to vacuum and update my indexes.
Yesterday I first ran vacuum_indexes and that completed successfully -
i.e. it en-queued tasks to delete my existing indexes.
The next step was probably a mistake on my part - I then ran
update_indexes even t... |
Python module being reloaded for each request with django and mod_wsgi | 3,027,902 | 1 | 2 | 629 | 0 | python,django,apache,mod-wsgi | I guess, you had a value of 1 for MaxClients / MaxRequestsPerChild and/or ThreadsPerChild in your Apache settings. So Apache had to startup Django for every mod_python call. That's why it took so long. If you have a wsgi-daemon, then a restart takes only place if you "touch" the wsgi script. | 0 | 0 | 0 | 1 | 2010-06-11T18:46:00.000 | 2 | 0.099668 | false | 3,025,378 | 0 | 0 | 1 | 2 | I have a variable in init of a module which get loaded from the database and takes about 15 seconds.
For django development server everything is working fine but looks like with apache2 and mod_wsgi the module is loaded with every request (taking 15 seconds).
Any idea about this behavior?
Update: I have enabled daemo... |
Python module being reloaded for each request with django and mod_wsgi | 3,032,332 | 3 | 2 | 629 | 0 | python,django,apache,mod-wsgi | You were likely ignoring the fact that in embedded mode of mod_wsgi or with mod_python, the application is multiprocess. Thus requests may go to different processes and you will see a delay the first time a process which hasn't been hit before is encountered. In mod_wsgi daemon mode the default has only a single proces... | 0 | 0 | 0 | 1 | 2010-06-11T18:46:00.000 | 2 | 1.2 | true | 3,025,378 | 0 | 0 | 1 | 2 | I have a variable in init of a module which get loaded from the database and takes about 15 seconds.
For django development server everything is working fine but looks like with apache2 and mod_wsgi the module is loaded with every request (taking 15 seconds).
Any idea about this behavior?
Update: I have enabled daemo... |
Templates vs. coded HTML | 3,026,766 | 1 | 5 | 2,377 | 0 | python,html,templates | I would highly recommend using templates. Templates help to encourage a good MVC structure to your application. Python code that emits HTML, IMHO, is wrong. The reason I say that is because Python code should be responsible for doing logic and not have to worry about presentation. Template syntax is usually restric... | 0 | 0 | 0 | 0 | 2010-06-11T22:48:00.000 | 5 | 0.039979 | false | 3,026,731 | 0 | 0 | 1 | 1 | I have a web-app consisting of some html forms for maintaining some tables (SQlite, with CherryPy for web-server stuff). First I did it entirely 'the Python way', and generated html strings via. code, with common headers, footers, etc. defined as functions in a separate module.
I also like the idea of templates, so I ... |
What is the best way to implement a 'last seen' function in a django web app? | 3,033,505 | 1 | 7 | 1,321 | 0 | python,django,apache2 | You need to persist the info server-side, integrity isn't critical, throughput and latency are important. That means you should use some sort of key-value store.
Memcached and redis have keys that expire. You probably have memcached already installed, so use that.
You can reset expiry time of the user:last-seen:$userna... | 0 | 0 | 0 | 0 | 2010-06-12T08:12:00.000 | 4 | 0.049958 | false | 3,027,973 | 0 | 0 | 1 | 4 | I have a running django/apache2 + memcached app (ubuntu) and would like to keep track of logged in users that are online.
What would be the best way to track this?
I would prefer not writing to the database each time a logged in user loads a page; but what other options are there? |
What is the best way to implement a 'last seen' function in a django web app? | 3,028,869 | 0 | 7 | 1,321 | 0 | python,django,apache2 | You can't do that in django without using a database/persistent-storage because of the same reason why django sessions are stored in database: There can be multiple instances of your applications running and the must synchronize their states+data through a single persistence source [1]
Alternatively, you might want to ... | 0 | 0 | 0 | 0 | 2010-06-12T08:12:00.000 | 4 | 0 | false | 3,027,973 | 0 | 0 | 1 | 4 | I have a running django/apache2 + memcached app (ubuntu) and would like to keep track of logged in users that are online.
What would be the best way to track this?
I would prefer not writing to the database each time a logged in user loads a page; but what other options are there? |
What is the best way to implement a 'last seen' function in a django web app? | 3,028,094 | 1 | 7 | 1,321 | 0 | python,django,apache2 | A hashmap or a queue in memory with a task running every hour or so to persist it. | 0 | 0 | 0 | 0 | 2010-06-12T08:12:00.000 | 4 | 0.049958 | false | 3,027,973 | 0 | 0 | 1 | 4 | I have a running django/apache2 + memcached app (ubuntu) and would like to keep track of logged in users that are online.
What would be the best way to track this?
I would prefer not writing to the database each time a logged in user loads a page; but what other options are there? |
What is the best way to implement a 'last seen' function in a django web app? | 3,028,086 | 4 | 7 | 1,321 | 0 | python,django,apache2 | An approach might be:
you create a middleware that does the following on process_response:
check for a cookie called 'online', but only if the user is authenticated
if the cookie is not there,
set a cookie called 'online' with value '1'
set the lifespan of the cookie to 10 minutes
update the 'last_login' field of au... | 0 | 0 | 0 | 0 | 2010-06-12T08:12:00.000 | 4 | 0.197375 | false | 3,027,973 | 0 | 0 | 1 | 4 | I have a running django/apache2 + memcached app (ubuntu) and would like to keep track of logged in users that are online.
What would be the best way to track this?
I would prefer not writing to the database each time a logged in user loads a page; but what other options are there? |
Where is the Google App Engine SDK path on OSX? | 3,030,645 | 60 | 31 | 17,766 | 0 | python,eclipse,google-app-engine,pydev | /usr/local/google_appengine - that's a symlink that links to the SDK. | 0 | 1 | 0 | 0 | 2010-06-13T00:14:00.000 | 3 | 1.2 | true | 3,030,585 | 0 | 0 | 1 | 2 | I need to know for creating a Pydev Google App Engine Project in Eclipse. |
Where is the Google App Engine SDK path on OSX? | 5,189,889 | 28 | 31 | 17,766 | 0 | python,eclipse,google-app-engine,pydev | /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine | 0 | 1 | 0 | 0 | 2010-06-13T00:14:00.000 | 3 | 1 | false | 3,030,585 | 0 | 0 | 1 | 2 | I need to know for creating a Pydev Google App Engine Project in Eclipse. |
is there any way to enforce the 30 seconds limit on local appengine dev server? | 3,031,594 | 1 | 3 | 138 | 0 | python,django,google-app-engine | It's possible, as Alex demonstrates, but it's not really a good idea: The performance characteristics of the development server are not the same as those of the production environment, so something that executes quickly locally may not be nearly as quick in production, and vice versa.
Also, your user facing tasks shoul... | 0 | 1 | 0 | 0 | 2010-06-13T00:22:00.000 | 2 | 0.099668 | false | 3,030,593 | 0 | 0 | 1 | 1 | Hey, i was wondering if there is a way to enforce the 30 seconds limit that is being enforced online at the appengine production servers to the local dev server? its impossible to test if i reach the limit before going production.
maybe some django middlware? |
uWSGI with Cherokee: first steps | 5,033,390 | 1 | 2 | 2,309 | 0 | python,wsgi,cherokee,uwsgi | There seems to be an issue with the 'make' method of installation on the uwsgi docs. Use 'python uwsgiconfig.py --build' instead. That worked for me. Cherokee, Django running on Ubuntu 10.10. | 0 | 1 | 0 | 1 | 2010-06-13T03:16:00.000 | 3 | 0.066568 | false | 3,030,936 | 0 | 0 | 1 | 1 | Has anyone tried using uWSGI with Cherokee? Can you share your experiences and what documents you relied upon the most? I am trying to get started from the documentation on both (uWSGI and Cherokee) websites. Nothing works yet. I am using Ubuntu 10.04.
Edit: To clarify, Cherokee has been working fine. I am getting the... |
Which programming language for compute-intensive trading portfolio simulation? | 3,031,234 | 5 | 5 | 995 | 0 | java,python,trading | Pick the language you are most familiar with. If you know them all equally and speed is a real concern, pick C. | 0 | 0 | 0 | 1 | 2010-06-13T05:45:00.000 | 7 | 0.141893 | false | 3,031,225 | 0 | 0 | 1 | 6 | I am building a trading portfolio management system that is responsible for production, optimization, and simulation of non-high frequency trading portfolios (dealing with 1min or 3min bars of data, not tick data).
I plan on employing Amazon web services to take on the entire load of the application.
I have four choic... |
Which programming language for compute-intensive trading portfolio simulation? | 3,031,266 | 4 | 5 | 995 | 0 | java,python,trading | Write it in your preferred language. To me that sounds like python. When you start running the system you can profile it and see where the bottlenecks are. Once you do some basic optimisations if it's still not acceptable you can rewrite portions in C.
A consideration could be writing this in iron python to take advan... | 0 | 0 | 0 | 1 | 2010-06-13T05:45:00.000 | 7 | 0.113791 | false | 3,031,225 | 0 | 0 | 1 | 6 | I am building a trading portfolio management system that is responsible for production, optimization, and simulation of non-high frequency trading portfolios (dealing with 1min or 3min bars of data, not tick data).
I plan on employing Amazon web services to take on the entire load of the application.
I have four choic... |
Which programming language for compute-intensive trading portfolio simulation? | 3,031,544 | 4 | 5 | 995 | 0 | java,python,trading | I would pick Java for this task. In terms of RAM, the difference between Java and C++ is that in Java, each Object has an overhead of 8 Bytes (using the Sun 32-bit JVM or the Sun 64-bit JVM with compressed pointers). So if you have millions of objects flying around, this can make a difference. In terms of speed, Java a... | 0 | 0 | 0 | 1 | 2010-06-13T05:45:00.000 | 7 | 1.2 | true | 3,031,225 | 0 | 0 | 1 | 6 | I am building a trading portfolio management system that is responsible for production, optimization, and simulation of non-high frequency trading portfolios (dealing with 1min or 3min bars of data, not tick data).
I plan on employing Amazon web services to take on the entire load of the application.
I have four choic... |
Which programming language for compute-intensive trading portfolio simulation? | 3,031,844 | 3 | 5 | 995 | 0 | java,python,trading | Why only one language for your system? If I were you, I will build the entire system in Python, but C or C++ will be used for performance-critical components. In this way, you will have a very flexible and extendable system with fast-enough performance. You can find even tools to generate wrappers automatically (e.g. S... | 0 | 0 | 0 | 1 | 2010-06-13T05:45:00.000 | 7 | 0.085505 | false | 3,031,225 | 0 | 0 | 1 | 6 | I am building a trading portfolio management system that is responsible for production, optimization, and simulation of non-high frequency trading portfolios (dealing with 1min or 3min bars of data, not tick data).
I plan on employing Amazon web services to take on the entire load of the application.
I have four choic... |
Which programming language for compute-intensive trading portfolio simulation? | 3,035,998 | 5 | 5 | 995 | 0 | java,python,trading | While I am a huge fan of Python and personaly I'm not a great lover of Java, in this case I have to concede that Java is the right way to go.
For many projects Python's performance just isn't a problem, but in your case even minor performance penalties will add up extremely quickly. I know this isn't a real-time simula... | 0 | 0 | 0 | 1 | 2010-06-13T05:45:00.000 | 7 | 0.141893 | false | 3,031,225 | 0 | 0 | 1 | 6 | I am building a trading portfolio management system that is responsible for production, optimization, and simulation of non-high frequency trading portfolios (dealing with 1min or 3min bars of data, not tick data).
I plan on employing Amazon web services to take on the entire load of the application.
I have four choic... |
Which programming language for compute-intensive trading portfolio simulation? | 3,036,242 | 0 | 5 | 995 | 0 | java,python,trading | It is useful to look at the inner loop of your numerical code. After all you will spend most of your CPU-time inside this loop.
If the inner loop is a matrix operation, then I suggest python and scipy, but of the inner loop if not a matrix operation, then I would worry about python being slow. (Or maybe I would wrap c... | 0 | 0 | 0 | 1 | 2010-06-13T05:45:00.000 | 7 | 0 | false | 3,031,225 | 0 | 0 | 1 | 6 | I am building a trading portfolio management system that is responsible for production, optimization, and simulation of non-high frequency trading portfolios (dealing with 1min or 3min bars of data, not tick data).
I plan on employing Amazon web services to take on the entire load of the application.
I have four choic... |
Eclipse + Django: How to get bytecode output when python source files change? | 3,031,660 | 2 | 2 | 463 | 0 | python,django,build-process,build,bytecode | You shouldn't ever need to 'compile' your .pyc files manually. This is always done automatically at runtime by the Python interpreter.
In rare instances, such as when you delete an entire .py module, you may need to manually delete the corresponding .pyc. But there's no need to do any other manual compiling.
What makes... | 0 | 0 | 0 | 1 | 2010-06-13T07:09:00.000 | 1 | 0.379949 | false | 3,031,383 | 0 | 0 | 1 | 1 | Whenever I change my python source files in my Django project, the .pyc files become out of date. Of course that's because I need to recompile them in order to test them through my local Apache web server. I would like to get around this manual process by employing some automatic means of compiling them on save, or o... |
Raising events and object persistence in Django | 3,031,565 | 2 | 1 | 267 | 0 | python,django | Something else to remember: You need to maintain a browser session with the remote site so that site knows which CAPTCHA you're trying to solve. Lots of webclients allow you to store your cookies and I'd suggest you dump them in the Django Session of the user you're doing the screen scraping for. Then load them back up... | 0 | 0 | 0 | 0 | 2010-06-13T07:47:00.000 | 2 | 1.2 | true | 3,031,483 | 0 | 0 | 1 | 2 | I have a tricky Django problem which didn't occur to me when I was developing it. My Django application allows a user to sign up and store his login credentials for a sites. The Django application basically allows the user to search this other site (by scraping content off it) and returns the result to the user. For ea... |
Raising events and object persistence in Django | 6,689,964 | 0 | 1 | 267 | 0 | python,django | request.session['name'] = variable will store it
then,
variable = request.session['name'] will retrieve it.
Remember though, its not a database, just a simple session store and shouldn't be relied on for anything critical | 0 | 0 | 0 | 0 | 2010-06-13T07:47:00.000 | 2 | 0 | false | 3,031,483 | 0 | 0 | 1 | 2 | I have a tricky Django problem which didn't occur to me when I was developing it. My Django application allows a user to sign up and store his login credentials for a sites. The Django application basically allows the user to search this other site (by scraping content off it) and returns the result to the user. For ea... |
Why can't Django find my admin media files once I leave the built-in runserver? | 3,032,552 | 2 | 3 | 1,064 | 0 | python,django,django-admin | When I look into the source code of Django, I find out the reason.
Somewhere in the django.core.management.commands.runserver module, a WSGIHandler object is
wrapped inside an AdminMediaHandler.
According to the document, AdminMediaHandler is a
WSGI middleware that intercepts calls
to the admin media directory, as... | 0 | 0 | 0 | 0 | 2010-06-13T14:18:00.000 | 3 | 1.2 | true | 3,032,519 | 0 | 0 | 1 | 1 | When I was using the built-in simple server, everything is OK, the admin interface is beautiful:
python manage.py runserver
However, when I try to serve my application using a wsgi server with django.core.handlers.wsgi.WSGIHandler, Django seems to forget where the admin media files is, and the admin page is not styled ... |
App Engine HTTP 500s | 3,033,229 | 2 | 1 | 829 | 0 | python,google-app-engine,http-error | I agree that the correlation between startup log messages and 500 errors is not necessarily causal. However, it could be and pocoa should take steps to ensure that his startup time is low and that time consuming tasks be deferred when possible.
One log entry and one 500 error does not mean much, but a few with time cor... | 0 | 1 | 0 | 0 | 2010-06-13T16:31:00.000 | 3 | 0.132549 | false | 3,033,009 | 0 | 0 | 1 | 1 | This request caused a new process to
be started for your application, and
thus caused your application code to
be loaded for the first time. This
request may thus take longer and use
more CPU than a typical request for
your application.
I've handled all the situations, also DeadlineExceededError too. But s... |
Storing task state between multiple django processes | 3,036,073 | 0 | 0 | 537 | 0 | python,django,transactions,multiprocessing,rabbitmq | This sounds brittle to me: You have a web app which posts to a queue and then inserts the initial state into the database. What happens if the consumer processes the message before the web app can commit the initial state?
What happens if the web app tries to insert the new state while the DB is locked by the consumer?... | 0 | 1 | 0 | 0 | 2010-06-14T09:09:00.000 | 2 | 0 | false | 3,036,049 | 0 | 0 | 1 | 2 | I am building a logging-bridge between rabbitmq messages and Django application to store background task state in the database for further investigation/review, also to make it possible to re-publish tasks via the Django admin interface.
I guess it's nothing fancy, just a standard Producer-Consumer pattern.
Web applic... |
Storing task state between multiple django processes | 3,036,410 | 0 | 0 | 537 | 0 | python,django,transactions,multiprocessing,rabbitmq | Web application publishes to message queue and inserts initial task state into the database
Do not do this.
Web application publishes to the queue. Done. Present results via template and finish the web transaction.
A consumer fetches from the queue and does things. For example, it might append to a log to the datab... | 0 | 1 | 0 | 0 | 2010-06-14T09:09:00.000 | 2 | 0 | false | 3,036,049 | 0 | 0 | 1 | 2 | I am building a logging-bridge between rabbitmq messages and Django application to store background task state in the database for further investigation/review, also to make it possible to re-publish tasks via the Django admin interface.
I guess it's nothing fancy, just a standard Producer-Consumer pattern.
Web applic... |
Restarting IIS6 - Python | 3,036,701 | 1 | 0 | 1,575 | 0 | python,windows,django,iis,iis-6 | I think that you can execute an iisreset via a commandline. I've never tried that with Django but it should work and be quite simple to implement. | 0 | 0 | 0 | 0 | 2010-06-14T09:29:00.000 | 3 | 0.066568 | false | 3,036,157 | 0 | 0 | 1 | 1 | I'm serving a Django app behind IIS 6. I'm wondering if I can restart IIS 6 within Python/Django and what one of the best ways to do would be.
Help would be great! |
Django admin, filter objects by ManyToMany reference | 3,052,792 | 0 | 1 | 2,800 | 0 | python,django,django-admin | Well, that's how I've done it.
I made custom admin template "change_list.html". Custom template tag creates a list of all existing galleries. Filtering is made like this:
class PhotoAdmin(admin.ModelAdmin):
...
def queryset(self, request):
if request.COOKIES.has_key("gallery"):
gallery = Ga... | 0 | 0 | 0 | 0 | 2010-06-14T11:05:00.000 | 4 | 0 | false | 3,036,680 | 0 | 0 | 1 | 1 | There's photologue application, simple photo gallery for django, implementing Photo and Gallery objects.
Gallery object has ManyToMany field, which references Photo objects.
I need to be able to get list of all Photos for a given Gallery. Is it possible to add Gallery filter to Photo's admin page?
If it's possible, ho... |
Get number of results from Django's raw() query function | 42,020,136 | 2 | 10 | 10,644 | 0 | python,django,django-orm | Count Works on RawQuerySet
ModelName.objects.raw("select 1 as id , COUNT(*) from modelnames_modelname") | 0 | 0 | 0 | 0 | 2010-06-14T12:44:00.000 | 3 | 0.132549 | false | 3,037,273 | 0 | 0 | 1 | 1 | I'm using a raw query and i'm having trouble finding out how to get the number of results it returns. Is there a way?
edit
.count() doesnt work. it returns: 'RawQuerySet' object has no attribute 'count' |
Best practice- How to team-split a django project while still allowing code reusal | 3,041,911 | 2 | 1 | 351 | 0 | python,django,deployment | I doubt the amount of code reuse you can get between the two projects, given your organizational situation, is worth the headaches, organizational risks, and delay risks that it would entail -- after all your team can never rely on the other, since
the ACME product needs to be rock
solid, and therefore needs to be
... | 0 | 0 | 0 | 0 | 2010-06-14T21:27:00.000 | 2 | 1.2 | true | 3,041,077 | 0 | 0 | 1 | 2 | I know this sounds kind of vague, but please let me explain-
I'm starting work on a brand new project, it will have two main components: "ACME PRODUCT" (think Gmail, Meebo, etc), and "THE SITE" (help, information, marketing stuff, promotional landing pages, etc lots of marketing-induced cruft).
So basically the url /a... |
Best practice- How to team-split a django project while still allowing code reusal | 3,041,105 | 3 | 1 | 351 | 0 | python,django,deployment | Django's componentization of apps means that you can have independent teams working on the various apps, with template tags and filters (and of course, normal Python functions) used for cross-app coupling. | 0 | 0 | 0 | 0 | 2010-06-14T21:27:00.000 | 2 | 0.291313 | false | 3,041,077 | 0 | 0 | 1 | 2 | I know this sounds kind of vague, but please let me explain-
I'm starting work on a brand new project, it will have two main components: "ACME PRODUCT" (think Gmail, Meebo, etc), and "THE SITE" (help, information, marketing stuff, promotional landing pages, etc lots of marketing-induced cruft).
So basically the url /a... |
Where is Python language used? | 3,043,222 | 2 | 45 | 123,495 | 0 | python | Many websites uses Django or Zope/Plone web framework, these are written in Python.
Python is used a lot for writing system administration software, usually when bash scripts (shell script) isn't up to the job, but going C/C++ is an overkill. This is also the spectrum where perl, awk, etc stands. Gentoo's emerge/portag... | 0 | 0 | 0 | 0 | 2010-06-15T06:54:00.000 | 7 | 0.057081 | false | 3,043,085 | 1 | 0 | 1 | 2 | I am a web developer and usually use PHP, JavaScript or MySQL.
I have heard lot about Python. But I have no idea where it is used and why it is used.
Just like PHP, ASP, ColdFusion, .NET are used to build websites, and
C, C++, Java are used to build software or desktop apps.
Where does Python fit in this?
What can Py... |
Where is Python language used? | 3,043,192 | 1 | 45 | 123,495 | 0 | python | Python is used for developing sites. It's more highlevel than php.
Python is used for linux dekstop applications. For example, the most of Ubuntu configurations utilites are pythonic. | 0 | 0 | 0 | 0 | 2010-06-15T06:54:00.000 | 7 | 0.028564 | false | 3,043,085 | 1 | 0 | 1 | 2 | I am a web developer and usually use PHP, JavaScript or MySQL.
I have heard lot about Python. But I have no idea where it is used and why it is used.
Just like PHP, ASP, ColdFusion, .NET are used to build websites, and
C, C++, Java are used to build software or desktop apps.
Where does Python fit in this?
What can Py... |
Django: how to create sites dynamically? | 8,602,597 | 0 | 1 | 737 | 0 | python,django,sites | The django site framework will do that, but it can't server the site according to the domain name. You'll have to do that using you server such as Apache, Nginx, etc. | 0 | 0 | 0 | 0 | 2010-06-15T14:19:00.000 | 2 | 0 | false | 3,046,036 | 0 | 0 | 1 | 1 | I need to create an application for the company where I can create sites dynamically. For example, I need an admin interface (Django's admin is enough) where I can setup a new site and add some settings to it.
Each site must hold a domain (domains can be manually added to apache conf, but if Django can handle it too wo... |
Online job-searching is tedious. Help me automate it | 3,048,460 | 1 | 7 | 567 | 0 | python,ruby,regex,perl,nlp | Ok, this answer is probably not going to be helpful -- I will say that up front. But, in my opinion, merely thinking about the problem in this way is enough to get you hired at most places I've worked. My suggestion? Contact the hiring manager at any of the postings in which you have interest, tell them this is what... | 0 | 0 | 0 | 0 | 2010-06-15T19:14:00.000 | 3 | 0.066568 | false | 3,048,268 | 1 | 0 | 1 | 2 | Many job sites have broken searches that don't let you narrow down jobs by experience level. Even when they do, it's usually wrong. This requires you to wade through hundreds of postings that you can't apply for before finding a relevant one, quite tedious. Since I'd rather focus on writing cover letters etc., I want t... |
Online job-searching is tedious. Help me automate it | 3,050,912 | 1 | 7 | 567 | 0 | python,ruby,regex,perl,nlp | I developed a good parse and email routine for a couple of job websites when I was looking for work for myself and a couple of friends. I agree with the other posts, this is a great way to look at the problem. Just to drop a little info, I did it mostly in ruby, and used tor proxies and some other methods to make sure ... | 0 | 0 | 0 | 0 | 2010-06-15T19:14:00.000 | 3 | 0.066568 | false | 3,048,268 | 1 | 0 | 1 | 2 | Many job sites have broken searches that don't let you narrow down jobs by experience level. Even when they do, it's usually wrong. This requires you to wade through hundreds of postings that you can't apply for before finding a relevant one, quite tedious. Since I'd rather focus on writing cover letters etc., I want t... |
Repoze.bfg or Grok | 3,054,308 | 3 | 1 | 338 | 0 | python,plone,zope | BFG doesn't have very much to do with Zope, except:
it uses some Zope libraries internally.
it uses a variant of ZPT as its built-in templating language.
it uses some concepts, such as traversal, that will be familiar to Zope people.
If you know Zope 3 very well, and you like it, you'll like Grok. If you want a fram... | 0 | 0 | 0 | 0 | 2010-06-15T22:10:00.000 | 2 | 1.2 | true | 3,049,431 | 0 | 0 | 1 | 1 | I am about to take the head long plunge into Zope land and am wondering which framework would fit my needs better. I have some experience toying around with django and the primary reason I am switching to a zope-based framework is ZPT and also needing to occasionally do things with Plone. Both seem to be well run proje... |
Django ORM and PostgreSQL connection limits | 3,049,796 | 1 | 3 | 2,568 | 1 | python,database,django,postgresql,django-orm | This could be caused by other things. For example, configuring Apache/mod_wsgi in a way that theoretically it could accept more concurrent requests than what the database itself may be able to accept at the same time. Have you reviewed your Apache/mod_wsgi configuration and compared limit on maximum clients to that of ... | 0 | 0 | 0 | 0 | 2010-06-15T22:45:00.000 | 1 | 1.2 | true | 3,049,625 | 0 | 0 | 1 | 1 | I'm running a Django project on Postgresql 8.1.21 (using Django 1.1.1, Python2.5, psycopg2, Apache2 with mod_wsgi 3.2). We've recently encountered this lovely error:
OperationalError: FATAL: connection limit exceeded for non-superusers
I'm not the first person to run up against this. There's a lot of discussion about ... |
Which language should I use for Artificial intelligence on web projects | 3,050,643 | 0 | 6 | 10,608 | 0 | java,php,python,artificial-intelligence | Never use PHP for AI. Java or C/C++ is the best, but Python for fast development. | 0 | 0 | 0 | 1 | 2010-06-16T02:59:00.000 | 9 | 0 | false | 3,050,450 | 0 | 0 | 1 | 7 | I have to do one project for my thesis involving Artificial intelligence, collaborative filtering and machine learning methods.
I only know PHP/mysq/JS, and there is not much AI stuff examples in PHP.
There are some books on AI on internet but they use Java , Python.
Now I have to apply AI techniques on web application... |
Which language should I use for Artificial intelligence on web projects | 3,050,476 | 6 | 6 | 10,608 | 0 | java,php,python,artificial-intelligence | Does it really matter which language your books use? I mean, you're not gonna copy-paste those examples. And you'll learn to recognize basic constructs (functions, loops, etc) pretty fast. It's not like learning to read Chinese.
Talking about learning time, there's probably no definite answer to this question. I think ... | 0 | 0 | 0 | 1 | 2010-06-16T02:59:00.000 | 9 | 1 | false | 3,050,450 | 0 | 0 | 1 | 7 | I have to do one project for my thesis involving Artificial intelligence, collaborative filtering and machine learning methods.
I only know PHP/mysq/JS, and there is not much AI stuff examples in PHP.
There are some books on AI on internet but they use Java , Python.
Now I have to apply AI techniques on web application... |
Which language should I use for Artificial intelligence on web projects | 3,051,952 | 3 | 6 | 10,608 | 0 | java,php,python,artificial-intelligence | Which language should i choose java or python.
Here are a few things to consider:
java is more widely used (presumably more mature code "out there" to look at - but I haven't tested that out)
python is more prolific (you write faster in python than in java), and from learning the language to writing the code that you... | 0 | 0 | 0 | 1 | 2010-06-16T02:59:00.000 | 9 | 0.066568 | false | 3,050,450 | 0 | 0 | 1 | 7 | I have to do one project for my thesis involving Artificial intelligence, collaborative filtering and machine learning methods.
I only know PHP/mysq/JS, and there is not much AI stuff examples in PHP.
There are some books on AI on internet but they use Java , Python.
Now I have to apply AI techniques on web application... |
Which language should I use for Artificial intelligence on web projects | 3,050,709 | 2 | 6 | 10,608 | 0 | java,php,python,artificial-intelligence | You can use any language you like, as long as the server it's hosted on supports it. You can use HTML/JS as the user interface, and request results from the server with AJAX requests.
What answers those requests would be your AI code, and that can be anything you want. PHP makes it really simple to answer AJAX requests... | 0 | 0 | 0 | 1 | 2010-06-16T02:59:00.000 | 9 | 0.044415 | false | 3,050,450 | 0 | 0 | 1 | 7 | I have to do one project for my thesis involving Artificial intelligence, collaborative filtering and machine learning methods.
I only know PHP/mysq/JS, and there is not much AI stuff examples in PHP.
There are some books on AI on internet but they use Java , Python.
Now I have to apply AI techniques on web application... |
Which language should I use for Artificial intelligence on web projects | 3,264,444 | 0 | 6 | 10,608 | 0 | java,php,python,artificial-intelligence | I believe Python is nice for this sort of tasks because of it's flexibility. Using the numpy/scipy libraries together with a nice plotting lib (chaco or matplotlib for instance) makes the workflow of working with the data and algorithms easy and you can lab around with the code in the live interpreter in an almost matl... | 0 | 0 | 0 | 1 | 2010-06-16T02:59:00.000 | 9 | 0 | false | 3,050,450 | 0 | 0 | 1 | 7 | I have to do one project for my thesis involving Artificial intelligence, collaborative filtering and machine learning methods.
I only know PHP/mysq/JS, and there is not much AI stuff examples in PHP.
There are some books on AI on internet but they use Java , Python.
Now I have to apply AI techniques on web application... |
Which language should I use for Artificial intelligence on web projects | 47,068,977 | 0 | 6 | 10,608 | 0 | java,php,python,artificial-intelligence | AI is not a language or a specific problem like summation or finding an average of some numbers. It's the intelligence which is going to be developed artificially. And to make a system intelligent especially a computer you can use any language that computer can understand and you are comfortable with (C, Java, Python, ... | 0 | 0 | 0 | 1 | 2010-06-16T02:59:00.000 | 9 | 0 | false | 3,050,450 | 0 | 0 | 1 | 7 | I have to do one project for my thesis involving Artificial intelligence, collaborative filtering and machine learning methods.
I only know PHP/mysq/JS, and there is not much AI stuff examples in PHP.
There are some books on AI on internet but they use Java , Python.
Now I have to apply AI techniques on web application... |
Which language should I use for Artificial intelligence on web projects | 3,051,880 | 0 | 6 | 10,608 | 0 | java,php,python,artificial-intelligence | Pretty much any language can be used to code pretty much anything - given the effort and will. But Python has more functional programming constructs which may be more useful when you are coding AI. | 0 | 0 | 0 | 1 | 2010-06-16T02:59:00.000 | 9 | 0 | false | 3,050,450 | 0 | 0 | 1 | 7 | I have to do one project for my thesis involving Artificial intelligence, collaborative filtering and machine learning methods.
I only know PHP/mysq/JS, and there is not much AI stuff examples in PHP.
There are some books on AI on internet but they use Java , Python.
Now I have to apply AI techniques on web application... |
redirection follow by post | 3,051,343 | 0 | 0 | 81 | 0 | javascript,python | It can work like this:
on air ticket booking system you have a html form pointing on certain airline booking website (by action parameter). If user submits data then data lands on airline booking website and this website proceed the request.
Usuallly people want to get back to the first site. This can be done by sendin... | 0 | 0 | 1 | 0 | 2010-06-16T03:07:00.000 | 1 | 1.2 | true | 3,050,477 | 0 | 0 | 1 | 1 | just wonder how those air ticket booking website redirect the user to the airline booking website and then fill up(i suppose doing POST) the required information so that the users will land on the booking page with origin/destination/date selected?
Is the technique used is to open up new browser window and do a ajax PO... |
Parse (extract) DTMF in Python | 3,050,536 | 1 | 2 | 6,174 | 0 | python,dtmf | Do an FFT on the data. You should get spikes at the frequencies of the two tones. | 0 | 0 | 0 | 0 | 2010-06-16T03:22:00.000 | 2 | 0.099668 | false | 3,050,528 | 1 | 0 | 1 | 1 | If I have a recorded audio file (MP3), is there any way to get the figure out the DTMF tones that were recorded in pure Python?
(If pure python is not available, then Java is okay too. The point being that it should be able to run in Google Appengine) |
multiple custom app in django | 3,053,690 | 0 | 0 | 72 | 0 | python,django | You'll need to be a bit more specific. There's nothing magical about an app in Django - it's just a collection of models and views. If you need access to some of the models from one app in another app, just import them and use them as normal. | 0 | 0 | 0 | 0 | 2010-06-16T13:03:00.000 | 1 | 0 | false | 3,053,442 | 0 | 0 | 1 | 1 | I want to have two custom made app dealing with two different tasks.
i have a page(template) where the data from the both app come together.
how to deploy url for that, in the common urls.py so that the two app work together. how to integrate the views from both app to return data to same template simultaneously. is th... |
Django : In a view how do I obtain the sessionid which will be part of the Set-Cookie header of following response? | 3,054,422 | 1 | 0 | 501 | 0 | python,django,cookies,django-authentication | I think you should be able to access this via request.session.session_key | 0 | 0 | 0 | 0 | 2010-06-16T14:01:00.000 | 1 | 1.2 | true | 3,053,923 | 0 | 0 | 1 | 1 | In case of views that contain login or logout,
this sessionid is different from the one submitted in request's Coockie header.
I need to retrieve it before returning response for some purpose.
How can I do this ? |
Passing variable urlname to url tag in django template | 16,610,048 | 1 | 18 | 13,093 | 0 | python,django,django-urls,django-templates | if you are using Django 1.5 and up, django-reversetags is not required anymore for just passing view names as variables into templates, to be used within the url tag.
I was confused with the availability of django-reversetags, just thought of updating the matter correctly here. | 0 | 0 | 0 | 0 | 2010-06-16T21:26:00.000 | 5 | 0.039979 | false | 3,057,318 | 0 | 0 | 1 | 1 | What I'd like to do (for a recent changes 'widget' - not a django widget in this case) is pass a urlname into my template as a variable, then use it like so: {% url sitechangeobject.urlname %} Where urlname is a string containing a valid name for a url.
Is this possible? The template keeps breaking saying it can't find... |
Jython project in Eclipse can't find the xml module, but works in an identical project | 3,119,610 | 2 | 2 | 190 | 0 | java,python,eclipse,jython,pydev | eclipse stores project data in files like
.project
.pydevprojct
.classpath
with checkin / checkout via svn it is possible to lost some of these files
check your dot-files | 0 | 0 | 1 | 0 | 2010-06-16T21:38:00.000 | 1 | 0.379949 | false | 3,057,382 | 0 | 0 | 1 | 1 | I have two projects in Eclipse with Java and Python code, using Jython. Also I'm using PyDev. One project can import and use the xml module just fine, and the other gives the error ImportError: No module named xml. As far as I can tell, all the project properties are set identically. The working project was created fro... |
A daemon to call a function every 2 minutes with start and stop capablities | 3,057,550 | 4 | 1 | 549 | 0 | python,django | There are a number of ways to achieve this. Assuming the correct server resources I would write a python script that calls function xyz "outside" of your django directory (although importing the necessary stuff) that only runs if /var/run/django-stuff/my-daemon.run exists. Get cron to run this every two minutes.
Then, ... | 0 | 1 | 0 | 0 | 2010-06-16T22:03:00.000 | 3 | 0.26052 | false | 3,057,507 | 0 | 0 | 1 | 2 | I am working on a django web application.
A function 'xyx' (it updates a variable) needs to be called every 2 minutes.
I want one http request should start the daemon and keep calling xyz (every 2 minutes) until I send another http request to stop it.
Appreciate your ideas.
Thanks
Vishal Rana |
A daemon to call a function every 2 minutes with start and stop capablities | 3,057,553 | 2 | 1 | 549 | 0 | python,django | Probably a little hacked but you could try this:
Set up a crontab entry that runs a script every two minutes. This script will check for some sort of flag (file existence, contents of a file, etc.) on the disk to decide whether to run a given python module. The problem with this is it could take up to 1:59 to run the f... | 0 | 1 | 0 | 0 | 2010-06-16T22:03:00.000 | 3 | 0.132549 | false | 3,057,507 | 0 | 0 | 1 | 2 | I am working on a django web application.
A function 'xyx' (it updates a variable) needs to be called every 2 minutes.
I want one http request should start the daemon and keep calling xyz (every 2 minutes) until I send another http request to stop it.
Appreciate your ideas.
Thanks
Vishal Rana |
What's the best option to process credit card payments in Django? | 4,027,265 | 4 | 32 | 31,908 | 0 | python,django,credit-card,payment | You can avoid PCI audits if the credit card details never touch your server... for example by using payment forms hosted on the servers of your chosen payment gateway provider.
I have used SagePay here in the UK (and built Django connectors for their service from scratch - sorry not on github yet...) and they offer pay... | 0 | 0 | 0 | 0 | 2010-06-16T22:30:00.000 | 4 | 0.197375 | false | 3,057,643 | 0 | 0 | 1 | 1 | I need to process credit card payments on an app that provides a service outside the U.S. Given that Paypal it's not an option, I was wondering if there other services I could try. What would you recommend? |
Does Python Django support custom SQL and denormalized databases with no Foreign Key relationships? | 3,320,441 | 0 | 2 | 640 | 1 | python,mysql,django | I concur with the 'no foreign keys' advice (with the disclaimer: I also work for Percona).
The reason why it is is recommended is for concurrency / reducing locking internally.
It can be a difficult "optimization" to sell, but if you consider that the database has transactions (and is more or less ACID compliant) then ... | 0 | 0 | 0 | 0 | 2010-06-17T23:07:00.000 | 5 | 0 | false | 3,066,255 | 0 | 0 | 1 | 3 | I've just started learning Python Django and have a lot of experience building high traffic websites using PHP and MySQL. What worries me so far is Python's overly optimistic approach that you will never need to write custom SQL and that it automatically creates all these Foreign Key relationships in your database. The... |
Does Python Django support custom SQL and denormalized databases with no Foreign Key relationships? | 3,066,274 | 0 | 2 | 640 | 1 | python,mysql,django | django-admin inspectdb allows you to reverse engineer a models file from existing tables. That is only a very partial response to your question ;) | 0 | 0 | 0 | 0 | 2010-06-17T23:07:00.000 | 5 | 0 | false | 3,066,255 | 0 | 0 | 1 | 3 | I've just started learning Python Django and have a lot of experience building high traffic websites using PHP and MySQL. What worries me so far is Python's overly optimistic approach that you will never need to write custom SQL and that it automatically creates all these Foreign Key relationships in your database. The... |
Does Python Django support custom SQL and denormalized databases with no Foreign Key relationships? | 3,066,360 | 0 | 2 | 640 | 1 | python,mysql,django | You can just create the model.py and avoid having SQL Alchemy automatically create the tables leaving it up to you to define the actual tables as you please. So although there are foreign key relationships in the model.py this does not mean that they must exist in the actual tables. This is a very good thing consider... | 0 | 0 | 0 | 0 | 2010-06-17T23:07:00.000 | 5 | 0 | false | 3,066,255 | 0 | 0 | 1 | 3 | I've just started learning Python Django and have a lot of experience building high traffic websites using PHP and MySQL. What worries me so far is Python's overly optimistic approach that you will never need to write custom SQL and that it automatically creates all these Foreign Key relationships in your database. The... |
django on appengine | 13,855,137 | 0 | 1 | 253 | 0 | python,django,google-app-engine | Appengine comes with built in Django, if you look under your (google_appengine/lib/django_1_3) lib dir you will see a few versions. You can define what version you want to be used in your app.yaml
It isn't a full release of Django and if you do want to have full admin functionality of Django you might have to use some... | 0 | 1 | 0 | 0 | 2010-06-18T05:48:00.000 | 3 | 0 | false | 3,067,452 | 0 | 0 | 1 | 1 | I am impressed with django.Am am currenty a java developer.I want to make some cool websites for myself but i want to host it in some third pary environmet.
Now the question is can i host the django application on appengine?If yes , how??
Are there any site built using django which are already hosted on appengine? |
Django DateField without year | 3,067,477 | 1 | 10 | 4,685 | 0 | python,django,datefield | A DateField is a whole date. If you only care about the month and day then use __month and __day when querying. | 0 | 0 | 0 | 0 | 2010-06-18T05:48:00.000 | 3 | 0.066568 | false | 3,067,453 | 0 | 0 | 1 | 1 | Is it possible to have a DateField without the year? Or will I have to use a CharField? I am using the admin to edit the models. |
Display image in Django Form | 3,068,886 | 1 | 4 | 1,365 | 0 | python,django | This template responsibility to display this image in your case, I believe.
If you form need to be able to send image related information (path, url..), you'll need to create a dedicated widget. | 0 | 0 | 0 | 0 | 2010-06-18T10:27:00.000 | 2 | 0.099668 | false | 3,068,827 | 0 | 0 | 1 | 2 | I need to display an image in a Django form. My Django form is quite simple - a single text input field. When I initialise my Django form in a view, I would like to pass the image path as a parameter, and the form when rendered in the template displays the image. Is is possible with Django forms or would i have to disp... |
Display image in Django Form | 3,068,909 | 1 | 4 | 1,365 | 0 | python,django | If the image is related to the form itself, not to any field in particular, then you can make a custom form class and override one of as_table(), as_ul(), as_p() methods. Or you can just use a custom template instead of leaving the form to render itself.
If it is field related then a custom widget is appropriate, as Pi... | 0 | 0 | 0 | 0 | 2010-06-18T10:27:00.000 | 2 | 1.2 | true | 3,068,827 | 0 | 0 | 1 | 2 | I need to display an image in a Django form. My Django form is quite simple - a single text input field. When I initialise my Django form in a view, I would like to pass the image path as a parameter, and the form when rendered in the template displays the image. Is is possible with Django forms or would i have to disp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.