title stringlengths 10 172 | question_id int64 469 40.1M | question_body stringlengths 22 48.2k | question_score int64 -44 5.52k | question_date stringlengths 20 20 | answer_id int64 497 40.1M | answer_body stringlengths 18 33.9k | answer_score int64 -38 8.38k | answer_date stringlengths 20 20 | tags list |
|---|---|---|---|---|---|---|---|---|---|
Restricting RSS elements by date with feedparser. [Python] | 2,204,858 | <p>I iterate a RSS feed like so where _file is the feed</p>
<pre><code>d = feedparser.parse(_file)
for element in d.entries:
print repr(element.date)
</code></pre>
<p>The date output comes out like so</p>
<pre><code>u'Thu, 16 Jul 2009 15:18:22 EDT'
</code></pre>
<p>I cant seem to understand how to actually qua... | 3 | 2010-02-05T03:29:42Z | 2,205,131 | <p>feedparser is supposed to give you a struct_time object from Python's time module. I'm guessing it doesn't recognize that date format and so is giving you the raw string.</p>
<p>See here on how to add support for parsing malformed timestamps:</p>
<p><a href="http://pythonhosted.org/feedparser/date-parsing.html" r... | 5 | 2010-02-05T04:51:18Z | [
"python",
"feedparser"
] |
Creating "classes" with Django | 2,204,874 | <p>I'm just learning Django so feel free to correct me in any of my assumptions. I probably just need my mindset adjusted.</p>
<p>What I'm trying to do is creating a "class" in an OOP style. For example, let's say we're designing a bunch of Rooms. Each Room has Furniture. And each piece of Furniture has a Type and... | 1 | 2010-02-05T03:33:39Z | 2,204,882 | <p>Why does each FurniturePiece need to have a unique name? It seems to me that if you remove that constraint everything just works.</p>
<p>(as an aside you seem to have accidentally dropped the models.Model base class for all but the Room model).</p>
| 3 | 2010-02-05T03:35:53Z | [
"python",
"django"
] |
Creating "classes" with Django | 2,204,874 | <p>I'm just learning Django so feel free to correct me in any of my assumptions. I probably just need my mindset adjusted.</p>
<p>What I'm trying to do is creating a "class" in an OOP style. For example, let's say we're designing a bunch of Rooms. Each Room has Furniture. And each piece of Furniture has a Type and... | 1 | 2010-02-05T03:33:39Z | 2,204,890 | <p>I don't get the problem with unique name. You can just specify it to be unique:</p>
<pre><code>class FurniturePiece(models.Model):
type = models.ForeignKey(FurnitureType)
color = models.ForeignKey(FurnitureColor)
sqft = models.IntegerField()
name = models.CharField(max_length=200, unique=True)
</cod... | 3 | 2010-02-05T03:38:42Z | [
"python",
"django"
] |
Creating "classes" with Django | 2,204,874 | <p>I'm just learning Django so feel free to correct me in any of my assumptions. I probably just need my mindset adjusted.</p>
<p>What I'm trying to do is creating a "class" in an OOP style. For example, let's say we're designing a bunch of Rooms. Each Room has Furniture. And each piece of Furniture has a Type and... | 1 | 2010-02-05T03:33:39Z | 2,205,052 | <p>This is how I would do it:</p>
<pre><code>class Room(models.Model):
name = models.CharField(max_length=255)
pieces = models.ManyToManyField('FurniturePiece')
class FurniturePiece(models.Model):
itemid = models.CharField(max_length=20, unique=True) # This is what I would require to be unique.
name ... | 1 | 2010-02-05T04:30:06Z | [
"python",
"django"
] |
How to redirect to a query string URL containing non-ascii characters in DJANGO? | 2,204,914 | <p>How to redirect to a query string URL containing non-ascii characters in DJANGO?</p>
<p>When I use "return HttpResponseRedirect(u'/page/?title=' + query_string)" where the query_string contains characters like "ä½ å¥½", I get an error "'ascii' codec can't encode characters in position 21-26: ordinal not in range(12... | 6 | 2010-02-05T03:47:23Z | 2,205,049 | <pre><code>HttpResponseRedirect(((u'/page/?title=' + query_string).encode('utf-8'))
</code></pre>
<p>is the first thing to try (since UTF8 is the only popular encoding that can handle all Unicode characters). That should definitely get rid of the exception you're observing -- the issue then moves to ensuring the hand... | 6 | 2010-02-05T04:29:15Z | [
"python",
"django",
"unicode",
"httpresponse"
] |
How to redirect to a query string URL containing non-ascii characters in DJANGO? | 2,204,914 | <p>How to redirect to a query string URL containing non-ascii characters in DJANGO?</p>
<p>When I use "return HttpResponseRedirect(u'/page/?title=' + query_string)" where the query_string contains characters like "ä½ å¥½", I get an error "'ascii' codec can't encode characters in position 21-26: ordinal not in range(12... | 6 | 2010-02-05T03:47:23Z | 2,208,111 | <p>django way:</p>
<pre><code>from django.http import HttpResponseRedirect
from django.utils.http import urlquote
return HttpResponseRedirect(u'/page/?title=%s' % urlquote(query_string))
</code></pre>
| 6 | 2010-02-05T15:09:06Z | [
"python",
"django",
"unicode",
"httpresponse"
] |
Multiple database connections with Python + Pylons + SQLAlchemy | 2,205,047 | <p>I'm trying to implement the proper architecture for multiple databases under Python + Pylons. I can't put everything in the config files since one of the database connections requires the connection info from a previous database connection (sharding). </p>
<p>What's the best way to implement such an infrastructur... | 2 | 2010-02-05T04:29:05Z | 2,224,250 | <p>Pylons's template configures the database in <code>config/environment.py</code>, probably with the <code>engine_from_config</code> method. It finds all the config settings with a particular prefix and passes them as keyword arguments to <code>create_engine</code>.</p>
<p>You can just replace that with a few calls t... | 1 | 2010-02-08T19:27:04Z | [
"python",
"pylons"
] |
How do I properly setup my python paths and permissions for Django+mod_wsgi deployment? | 2,205,105 | <p>The issue I'm having is my wsgi file can't import the wsgi handlers properly.</p>
<p><code>/var/log/apache2/error.log</code> reports:</p>
<blockquote>
<p>ImportError: No module named
django.core.handlers.wsgi</p>
</blockquote>
<p>Googling this brings up a couple results, mostly dealing with permissions errors... | 2 | 2010-02-05T04:44:12Z | 2,205,331 | <p>Sounds like you mod_wsgi is not compiled against Python 2.5 and instead compiled against Python 2.4 or 2.6. Run:</p>
<pre><code>ldd mod_wsgi.so
</code></pre>
<p>on the mod_wsgi.so file where it is installed to work out what it is using.</p>
<p>If it is different, you will need to recompile mod_wsgi from source co... | 0 | 2010-02-05T06:03:33Z | [
"python",
"django",
"mod-wsgi"
] |
How do I properly setup my python paths and permissions for Django+mod_wsgi deployment? | 2,205,105 | <p>The issue I'm having is my wsgi file can't import the wsgi handlers properly.</p>
<p><code>/var/log/apache2/error.log</code> reports:</p>
<blockquote>
<p>ImportError: No module named
django.core.handlers.wsgi</p>
</blockquote>
<p>Googling this brings up a couple results, mostly dealing with permissions errors... | 2 | 2010-02-05T04:44:12Z | 2,208,423 | <p>Since I'm on Debian it appears that django is in <code>/usr/lib/pymodules/python2.5</code> and not <code>/usr/lib/python2.5/site-packages</code>.</p>
<p>I added</p>
<pre><code>sys.path.append('/usr/lib/pymodules/python2.5')
</code></pre>
<p>to the top of my wsgi file and that did it, although I feel as though I ... | 2 | 2010-02-05T15:55:16Z | [
"python",
"django",
"mod-wsgi"
] |
How do I properly setup my python paths and permissions for Django+mod_wsgi deployment? | 2,205,105 | <p>The issue I'm having is my wsgi file can't import the wsgi handlers properly.</p>
<p><code>/var/log/apache2/error.log</code> reports:</p>
<blockquote>
<p>ImportError: No module named
django.core.handlers.wsgi</p>
</blockquote>
<p>Googling this brings up a couple results, mostly dealing with permissions errors... | 2 | 2010-02-05T04:44:12Z | 2,209,548 | <p>I don't think your problem lies with the sys.path. I've always used Mod_WSGI with Django using the Daemonized process, like so,</p>
<pre><code># Note these 2 lines
WSGIDaemonProcess site-1 user=user-1 group=user-1 threads=25
WSGIProcessGroup site-1
Alias /media/ /usr/local/django/mysite/media/
<Directory /usr/... | 1 | 2010-02-05T18:52:12Z | [
"python",
"django",
"mod-wsgi"
] |
how does get the title and content of this code in django-sphinx | 2,205,466 | <p>i get this stringï¼</p>
<pre><code>{'id': 1, 'weight': 101, 'attrs': {'date_added': 1265274382, 'group_id': 1}}{'id': 2, 'weight': 100, 'attrs': {'date_added': 1265274382, 'group_id': 1}}{'id': 4, 'weight': 100, 'attrs': {'date_added': 1265274382, 'group_id': 2}}
</code></pre>
<p>i want to get the real data(title... | 1 | 2010-02-05T06:44:22Z | 6,430,645 | <p>I think this link should be helpful for you <a href="http://pkarl.com/articles/guide-django-full-text-search-sphinx-and-django-sp/" rel="nofollow">http://pkarl.com/articles/guide-django-full-text-search-sphinx-and-django-sp/</a>
According to the information provided:</p>
<blockquote>
<p>You have to slice the resu... | 1 | 2011-06-21T19:05:59Z | [
"python",
"django",
"sphinx"
] |
How to get TRUE column position in wxStyledTextCtrl? | 2,205,624 | <p>I have a <code>wxStyledTextCtrl</code> and I want to find the column number of a given position in the document. Basically I want a function like <code>GetColumn</code> but I don't want tabs to be expanded.</p>
<p>Does such a function exist?</p>
| 1 | 2010-02-05T07:27:38Z | 15,879,727 | <p>You can use <code>PositionToXY()</code> method (inherited from the base class) to get this, at least with 2.9.4 it should give you what you need. If you use 2.8 and it doesn't work for you, you should do <code>line = LineFromPosition(pos)</code> and then use <code>pos - PositionFromLine(line)</code> as the index in ... | 0 | 2013-04-08T12:59:38Z | [
"python",
"wxwidgets",
"wxstyledtextctrl"
] |
Where would I import urllib2 for a class? | 2,205,712 | <p>I have a class that needs access to urllib2, the trivial example for me is:</p>
<pre><code>class foo(object):
myStringHTML = urllib2.urlopen("http://www.google.com").read()
</code></pre>
<p>How should I structure my code to include urllib2? In general, I want to store foo in a utility module with a number of ... | 1 | 2010-02-05T07:52:10Z | 2,205,745 | <p>You should import it in the <code>utilpackage</code> module, but only export the class <code>foo</code> from it:</p>
<pre><code>import urllib2
__all__ = ["foo"]
class foo(object):
myStringHtml = urllib2.urlopen("http://www.google.com").read()
</code></pre>
<p>Then you can do</p>
<pre><code>from utilpackage ... | 4 | 2010-02-05T08:00:42Z | [
"python",
"coding-style",
"module"
] |
Where would I import urllib2 for a class? | 2,205,712 | <p>I have a class that needs access to urllib2, the trivial example for me is:</p>
<pre><code>class foo(object):
myStringHTML = urllib2.urlopen("http://www.google.com").read()
</code></pre>
<p>How should I structure my code to include urllib2? In general, I want to store foo in a utility module with a number of ... | 1 | 2010-02-05T07:52:10Z | 2,205,767 | <p>Both <code>class</code> and <code>import</code> are normal Python instructions that have no magic attached (well, there are some things happening under the hood, but still they are just plain good Python instructions).</p>
<p>Python goes through your source code from top to bottom, executing every instruction on it... | 0 | 2010-02-05T08:06:17Z | [
"python",
"coding-style",
"module"
] |
Where would I import urllib2 for a class? | 2,205,712 | <p>I have a class that needs access to urllib2, the trivial example for me is:</p>
<pre><code>class foo(object):
myStringHTML = urllib2.urlopen("http://www.google.com").read()
</code></pre>
<p>How should I structure my code to include urllib2? In general, I want to store foo in a utility module with a number of ... | 1 | 2010-02-05T07:52:10Z | 2,207,959 | <p>My general rule of thumb is that if the import is used by many things within the file, I will put it at the very top. If it's only used by one single function or one single scope, I will place it closer to where it's used, say in the class or function.</p>
<p>However, this isn't a hard and fast rule, and I don't s... | 2 | 2010-02-05T14:47:57Z | [
"python",
"coding-style",
"module"
] |
best (python) setup for cpu / memory intensive task | 2,205,832 | <p>i'm doing simulation which generates thousands of result objects.
Each object size is around 1mb, and all the result objects should be on memory to be queried for various ad hoc reports. And it takes 1~2 secs to make one result object.</p>
<p>So it takes more than 5 minutes to get one simulation done even though i ... | 3 | 2010-02-05T08:19:21Z | 2,205,899 | <p>Since you can install all of those for free and it sounds like you already have the code implemented in both .Net and Java then I suggest you benchmark the program on all four platforms (windows/linux * java/.net). </p>
<p>It sounds like all the heavy lifting is done in Java/C#, so I suspect the relative performan... | 2 | 2010-02-05T08:34:28Z | [
"c#",
"java",
".net",
"python",
"memory"
] |
best (python) setup for cpu / memory intensive task | 2,205,832 | <p>i'm doing simulation which generates thousands of result objects.
Each object size is around 1mb, and all the result objects should be on memory to be queried for various ad hoc reports. And it takes 1~2 secs to make one result object.</p>
<p>So it takes more than 5 minutes to get one simulation done even though i ... | 3 | 2010-02-05T08:19:21Z | 2,205,986 | <p>@Dave is spot on, if you really care benchmark each combination and see.</p>
<p>Personally I'd suggest you stick with the tool set that you are most comfortable with, be that Windows, Java, Linux, .Net or any random combination there of. Your level of productivity in maintaining and developing your software usually... | 2 | 2010-02-05T08:53:04Z | [
"c#",
"java",
".net",
"python",
"memory"
] |
Using Mako In Windows | 2,205,836 | <p>I plan to use wsgi + mako in Windows.</p>
<p>I install mako using </p>
<pre><code>C:\wsgi>c:\Python26\Scripts\easy_install.exe Mako
</code></pre>
<p>No error. I get</p>
<pre><code>Finished processing dependencies for Mako
</code></pre>
<p>at end of the message.</p>
<p>I check my Python directory, I am havin... | 2 | 2010-02-05T08:20:13Z | 2,205,894 | <p>a few things to try</p>
<ul>
<li>make sure you're using python2.6</li>
<li>try <code>import mako</code> and see if you get a similar error</li>
<li>if mako imports correctly look at the value of <code>repr(mako)</code> and make sure it corresponds to the path you have.</li>
</ul>
| 1 | 2010-02-05T08:33:00Z | [
"python"
] |
Can I make a field in database use this django code ,and don't use 'python manage.py startapp xx' | 2,205,857 | <pre><code>from django.db import models
class Person(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
</code></pre>
<p>Is this possible?</p>
| 0 | 2010-02-05T08:25:33Z | 2,206,282 | <p>If you only want to access a database from Python, I recommend you use <a href="http://www.sqlalchemy.org/" rel="nofollow" title="SQLAlchemy">SQLAlchemy</a> instead.</p>
| 0 | 2010-02-05T09:45:59Z | [
"python",
"django"
] |
Searching a 2-Dimensional Tuple/List in Python | 2,205,985 | <p>I want to search a <code>tuple of tuples</code> for a particular string and return the index of the parent tuple. I seem to run into variations of this kind of search frequently.</p>
<p>What is the most pythonic way to do this?</p>
<p>I.E:</p>
<pre><code>derp = (('Cat','Pet'),('Dog','Pet'),('Spock','Vulcan'))
i =... | 3 | 2010-02-05T08:53:01Z | 2,206,021 | <p>Lambdas are fun!</p>
<pre><code>return reduce(
lambda x,(i,(a,b)): i,
filter(
lambda (i,(a,b)): a == "Spock",
enumerate(depr)
),
None
)
</code></pre>
| -1 | 2010-02-05T09:00:38Z | [
"python"
] |
Searching a 2-Dimensional Tuple/List in Python | 2,205,985 | <p>I want to search a <code>tuple of tuples</code> for a particular string and return the index of the parent tuple. I seem to run into variations of this kind of search frequently.</p>
<p>What is the most pythonic way to do this?</p>
<p>I.E:</p>
<pre><code>derp = (('Cat','Pet'),('Dog','Pet'),('Spock','Vulcan'))
i =... | 3 | 2010-02-05T08:53:01Z | 2,206,163 | <blockquote>
<p>It does the trick but I've got this notion that there's probably a one-liner for it ;)</p>
</blockquote>
<p>The one-liner is probably <em>not</em> the pythonic way to do it :)</p>
<p>The method you have used looks fine.</p>
<p><em>Edit</em>:</p>
<p>If you want to be cute:</p>
<pre><code>return ne... | 4 | 2010-02-05T09:26:53Z | [
"python"
] |
Searching a 2-Dimensional Tuple/List in Python | 2,205,985 | <p>I want to search a <code>tuple of tuples</code> for a particular string and return the index of the parent tuple. I seem to run into variations of this kind of search frequently.</p>
<p>What is the most pythonic way to do this?</p>
<p>I.E:</p>
<pre><code>derp = (('Cat','Pet'),('Dog','Pet'),('Spock','Vulcan'))
i =... | 3 | 2010-02-05T08:53:01Z | 2,206,174 | <p>If you're often searching the same tuple, you can build a dict.</p>
<pre><code>lookup_table = dict((key, i) for i, (key, unused) in enumerate(derp))
print lookup_table['Spock']
--> 2
</code></pre>
| 1 | 2010-02-05T09:29:22Z | [
"python"
] |
Searching a 2-Dimensional Tuple/List in Python | 2,205,985 | <p>I want to search a <code>tuple of tuples</code> for a particular string and return the index of the parent tuple. I seem to run into variations of this kind of search frequently.</p>
<p>What is the most pythonic way to do this?</p>
<p>I.E:</p>
<pre><code>derp = (('Cat','Pet'),('Dog','Pet'),('Spock','Vulcan'))
i =... | 3 | 2010-02-05T08:53:01Z | 4,828,217 | <p>Another way of getting it in one line would be:</p>
<pre><code>[d[0] for d in derp].index("Spock")
</code></pre>
<p>I'm not sure if the iterator evaluates all values before calling index, and therefor being inefficient.</p>
| 0 | 2011-01-28T12:29:49Z | [
"python"
] |
Searching a 2-Dimensional Tuple/List in Python | 2,205,985 | <p>I want to search a <code>tuple of tuples</code> for a particular string and return the index of the parent tuple. I seem to run into variations of this kind of search frequently.</p>
<p>What is the most pythonic way to do this?</p>
<p>I.E:</p>
<pre><code>derp = (('Cat','Pet'),('Dog','Pet'),('Spock','Vulcan'))
i =... | 3 | 2010-02-05T08:53:01Z | 13,343,720 | <p>Or you can do:</p>
<pre><code>dict(derp)[<key_name>]
</code></pre>
<p>eg.</p>
<pre><code>dict(derp)['Cat']
</code></pre>
<p>which will give you 'Pet'</p>
| 4 | 2012-11-12T12:29:26Z | [
"python"
] |
Is there a way to turn XML into dictionary and lists? | 2,205,987 | <pre><code><things>
<fruit>apple</fruit>
<hardware>mouse</hardware>
...
</things>
</code></pre>
<p>Turn it into:</p>
<pre><code>{'things':[{'fruit':'apple'}, {'hardware':'mouse'}]}
</code></pre>
<p>Is there an easy way to do this? Thanks.</p>
| 1 | 2010-02-05T08:53:17Z | 2,206,042 | <p>there's a nice recipe for that here:</p>
<p><a href="http://code.activestate.com/recipes/570085/" rel="nofollow">http://code.activestate.com/recipes/570085/</a></p>
<p>another good one is here:</p>
<p><a href="http://code.activestate.com/recipes/522991/" rel="nofollow">http://code.activestate.com/recipes/522991/<... | 1 | 2010-02-05T09:03:48Z | [
"python",
"xml",
"string",
"list"
] |
Python regex problem | 2,206,026 | <p>What I am trying to do: Parse a query for a leading or trailing ? which will result in a search on the rest of the string.</p>
<p>"foobar?" or "?foobar" results in a search.
"foobar" results in some other behavior.</p>
<p>This code works as expected in the interpreter: </p>
<pre><code> >>> import re
&... | 1 | 2010-02-05T09:01:12Z | 2,206,105 | <p>The problem is in your second regex. It matches the whole query, so using <code>re.sub()</code> will replace it all with an empty string. I.e. <code>lookForPrefix('foobar?',listOfPrefixes)</code> will return <code>''</code>. You are likely checking the return value in an <code>if</code>, so it evaluates the empty st... | 3 | 2010-02-05T09:16:06Z | [
"python",
"regex",
"django"
] |
Python regex problem | 2,206,026 | <p>What I am trying to do: Parse a query for a leading or trailing ? which will result in a search on the rest of the string.</p>
<p>"foobar?" or "?foobar" results in a search.
"foobar" results in some other behavior.</p>
<p>This code works as expected in the interpreter: </p>
<pre><code> >>> import re
&... | 1 | 2010-02-05T09:01:12Z | 2,207,846 | <p>You probably want to use raw strings for regexes, such as: r'^\s\?'. Regular strings will prevent problems with escaped characters becoming other values (r'\0' is the same as '\0', but different from '\0' (a single null character)).</p>
<p>Also r'^\?\s*|\?\s*$' will <em>NOT</em> work as intended by Max S. because ... | 0 | 2010-02-05T14:31:47Z | [
"python",
"regex",
"django"
] |
Python Dictionary Binary Search Tree | 2,206,100 | <p>I am struggling to get to know how to code a basic implementation using a dictionary and in-order traversal binary search tree in Python. The class have to be using the below structure.</p>
<p>I would be very happy if someone could fill out the blanks (pass) in each function to get me started.</p>
<pre><code>class... | 0 | 2010-02-05T09:15:19Z | 2,206,156 | <pre><code>class Dictionary:
def __init__ (self):
self.data = {}
def insert (self, key, value):
self.data[key] = value
def delete (self, key):
if key in self.data:
del self.data[key]
def find (self, key):
if key in self.data:
return self.data[key]
... | -2 | 2010-02-05T09:25:41Z | [
"python",
"dictionary",
"binary-tree"
] |
Python Dictionary Binary Search Tree | 2,206,100 | <p>I am struggling to get to know how to code a basic implementation using a dictionary and in-order traversal binary search tree in Python. The class have to be using the below structure.</p>
<p>I would be very happy if someone could fill out the blanks (pass) in each function to get me started.</p>
<pre><code>class... | 0 | 2010-02-05T09:15:19Z | 2,206,453 | <blockquote>
<p>binary tree</p>
</blockquote>
<p>You may want to use <a href="http://en.wikipedia.org/wiki/Binary_tree#Ahnentafel_list" rel="nofollow">the array representation of a binary tree</a>. Python has a powerful <a href="http://docs.python.org/tutorial/datastructures.html#more-on-lists" rel="nofollow">list d... | 0 | 2010-02-05T10:13:51Z | [
"python",
"dictionary",
"binary-tree"
] |
Python Dictionary Binary Search Tree | 2,206,100 | <p>I am struggling to get to know how to code a basic implementation using a dictionary and in-order traversal binary search tree in Python. The class have to be using the below structure.</p>
<p>I would be very happy if someone could fill out the blanks (pass) in each function to get me started.</p>
<pre><code>class... | 0 | 2010-02-05T09:15:19Z | 13,626,758 | <p>If you're still looking for an answer, have a look at this recipe: <a href="http://code.activestate.com/recipes/577197-sortedcollection/" rel="nofollow">http://code.activestate.com/recipes/577197-sortedcollection/</a>. I think it gives you enough of a basis to tweak it into exactly what you want.</p>
| 0 | 2012-11-29T13:19:29Z | [
"python",
"dictionary",
"binary-tree"
] |
Problems using the python WConio library | 2,206,125 | <p>I'm trying to use the WConio library for python, but when I import it, it gives this error:</p>
<blockquote>
<p>Traceback (most recent call last):<br>
File "WConioExample.py", line 15, in
< module><br>
import WConio File "d:\tools\development\python2.5\lib\site-packages\WConio.py",
line 23, in <b... | 0 | 2010-02-05T09:20:10Z | 2,206,303 | <p>Probably, you've installed 32 bit library on 64 bit system.</p>
| 1 | 2010-02-05T09:48:46Z | [
"python"
] |
Print string in a form of Unicode codes | 2,206,210 | <p>How can I print a string as a sequence of unicode codes in Python?</p>
<p>Input: <code>"еÑли"</code> (in Russian).</p>
<p>Output: <code>"\u0435\u0441\u043b\u0438"</code></p>
| 3 | 2010-02-05T09:36:03Z | 2,206,246 | <p>This should work:</p>
<pre><code>>>> s = u'еÑли'
>>> print repr(s)
u'\u0435\u0441\u043b\u0438'
</code></pre>
| 9 | 2010-02-05T09:41:03Z | [
"python",
"string",
"unicode"
] |
Print string in a form of Unicode codes | 2,206,210 | <p>How can I print a string as a sequence of unicode codes in Python?</p>
<p>Input: <code>"еÑли"</code> (in Russian).</p>
<p>Output: <code>"\u0435\u0441\u043b\u0438"</code></p>
| 3 | 2010-02-05T09:36:03Z | 2,206,247 | <p>Code:</p>
<pre><code>txt = u"еÑли"
print repr(txt)
</code></pre>
<p>Output:</p>
<pre><code>u'\u0435\u0441\u043b\u0438'
</code></pre>
| 3 | 2010-02-05T09:41:10Z | [
"python",
"string",
"unicode"
] |
Print string in a form of Unicode codes | 2,206,210 | <p>How can I print a string as a sequence of unicode codes in Python?</p>
<p>Input: <code>"еÑли"</code> (in Russian).</p>
<p>Output: <code>"\u0435\u0441\u043b\u0438"</code></p>
| 3 | 2010-02-05T09:36:03Z | 2,206,266 | <pre><code>a = u"\u0435\u0441\u043b\u0438"
print "".join("\u{0:04x}".format(ord(c)) for c in a)
</code></pre>
| 1 | 2010-02-05T09:43:31Z | [
"python",
"string",
"unicode"
] |
Print string in a form of Unicode codes | 2,206,210 | <p>How can I print a string as a sequence of unicode codes in Python?</p>
<p>Input: <code>"еÑли"</code> (in Russian).</p>
<p>Output: <code>"\u0435\u0441\u043b\u0438"</code></p>
| 3 | 2010-02-05T09:36:03Z | 2,206,297 | <p>If you need a specific encoding, you can use :</p>
<pre><code>txt = u'еÑли'
print txt.encode('utf8')
print txt.encode('utf16')
</code></pre>
| 0 | 2010-02-05T09:48:12Z | [
"python",
"string",
"unicode"
] |
global variable from django to javascript | 2,206,353 | <p>I would like some <strong>variables from my settings.py</strong> to be <strong>available in every javascript</strong> running across my project.</p>
<p>What is the most elegant way of achieving this?</p>
<p>Right now I can think of two:</p>
<ul>
<li><p>write a context processor and declare those globals in a base... | 4 | 2010-02-05T09:57:50Z | 2,206,464 | <p>I'm not familiar with django, so this might be completely incorrect.</p>
<p>Can you write out the variables to hidden HTML fields on the page. This will allow you to access them from JavaScript, or utilise them in form posts should you require that.</p>
| 1 | 2010-02-05T10:15:43Z | [
"javascript",
"python",
"django"
] |
global variable from django to javascript | 2,206,353 | <p>I would like some <strong>variables from my settings.py</strong> to be <strong>available in every javascript</strong> running across my project.</p>
<p>What is the most elegant way of achieving this?</p>
<p>Right now I can think of two:</p>
<ul>
<li><p>write a context processor and declare those globals in a base... | 4 | 2010-02-05T09:57:50Z | 2,206,532 | <p>I would use option 1. You should use a base template in any case, and a context processor is probably the best way of getting the variables into it.</p>
| 6 | 2010-02-05T10:33:41Z | [
"javascript",
"python",
"django"
] |
global variable from django to javascript | 2,206,353 | <p>I would like some <strong>variables from my settings.py</strong> to be <strong>available in every javascript</strong> running across my project.</p>
<p>What is the most elegant way of achieving this?</p>
<p>Right now I can think of two:</p>
<ul>
<li><p>write a context processor and declare those globals in a base... | 4 | 2010-02-05T09:57:50Z | 2,206,647 | <p>I have the same problem, and I'm using an ugly solution with a ârefactor laterâ note.<br>
I put a js_top block at the top of my base template, and then any template who needs additional includes or js variables set can use that block.<br>
So I have stuff such as this: </p>
<pre><code>{% block js_top %}
<... | 0 | 2010-02-05T10:58:04Z | [
"javascript",
"python",
"django"
] |
Debugging a subprocess.Popen call | 2,206,407 | <p>I have been using <code>subprocess.Popen</code> successfully in the past, when wrapping binaries with a python script to format arguments / customize etc...</p>
<p>Developing a nth wrapper, I did as usual... but nothing happens.</p>
<p>Here is the little code:</p>
<pre><code>print command
p = subprocess.Popen(com... | 4 | 2010-02-05T10:05:27Z | 2,206,499 | <p>Try this:</p>
<pre><code>p = subprocess.Popen(command,
shell = True, #is this even needed?
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
# stderr = subprocess.STDOUT #uncomment if reqd
)
</code></pre>
<p>Test... | 1 | 2010-02-05T10:24:38Z | [
"python",
"subprocess"
] |
Debugging a subprocess.Popen call | 2,206,407 | <p>I have been using <code>subprocess.Popen</code> successfully in the past, when wrapping binaries with a python script to format arguments / customize etc...</p>
<p>Developing a nth wrapper, I did as usual... but nothing happens.</p>
<p>Here is the little code:</p>
<pre><code>print command
p = subprocess.Popen(com... | 4 | 2010-02-05T10:05:27Z | 2,207,293 | <p>I've finally found the answer to my question, thanks to <code>badp</code> and his suggestions for debugging.</p>
<p>From the python page on the <a href="http://docs.python.org/library/subprocess.html" rel="nofollow">subprocess module</a>:</p>
<blockquote>
<p>The <em>executable</em> argument specifies the program... | 2 | 2010-02-05T12:58:13Z | [
"python",
"subprocess"
] |
moving a function out of my method in django | 2,206,422 | <p>Hay i have a method in my view which uploads an image, the image is then saved to a db object. I want to remove this from my view and either put it in my model or a seperate file.</p>
<pre><code>filename_bits = request.FILES['image'].name.split(".")
filename_bits.reverse()
extension = filename_bits[0]
# create fil... | 1 | 2010-02-05T10:07:50Z | 2,206,562 | <p>You should consider using an <a href="http://docs.djangoproject.com/en/dev/ref/models/fields/#imagefield" rel="nofollow">ImageField</a> in your model. For example in models.py you would have:</p>
<pre><code>def get_random_filename(car_picture, filename):
extension = filename.split('.')[-1]
return u'_%s_%s.... | 3 | 2010-02-05T10:40:57Z | [
"python",
"django",
"upload",
"model",
"methods"
] |
How do I do this with Python list? (itemgetter?) | 2,206,543 | <pre><code>[{'id':44}, {'name':'alexa'},{'color':'blue'}]
</code></pre>
<p>I want to select whatever in the list that is "id".
Basically, I want to print 44, since that's "id" in the list.</p>
| 2 | 2010-02-05T10:36:15Z | 2,206,560 | <p>You could do something like this:</p>
<pre><code>>>> KEY = 'id'
>>>
>>> my_list = [{'id':44}, {'name':'alexa'},{'color':'blue'}]
>>> my_ids = [x[KEY] for x in my_list if KEY in x]
>>> print my_ids
[44]
</code></pre>
<p>Which is obviously a list of the values you want. Y... | 3 | 2010-02-05T10:40:47Z | [
"python",
"list",
"dictionary"
] |
How do I do this with Python list? (itemgetter?) | 2,206,543 | <pre><code>[{'id':44}, {'name':'alexa'},{'color':'blue'}]
</code></pre>
<p>I want to select whatever in the list that is "id".
Basically, I want to print 44, since that's "id" in the list.</p>
| 2 | 2010-02-05T10:36:15Z | 2,206,568 | <p>That's a weird data structure... A list of one item dictionaries.</p>
<pre><code>key = 'id'
l = [{'id':44}, {'name':'alexa'},{'color':'blue'}]
print [ x[key] for x in l if key in x ][0]
</code></pre>
<p>Assuming you can rely on key being present precisely once...</p>
<p>Maybe you should just convert the list int... | 5 | 2010-02-05T10:41:51Z | [
"python",
"list",
"dictionary"
] |
How do I do this with Python list? (itemgetter?) | 2,206,543 | <pre><code>[{'id':44}, {'name':'alexa'},{'color':'blue'}]
</code></pre>
<p>I want to select whatever in the list that is "id".
Basically, I want to print 44, since that's "id" in the list.</p>
| 2 | 2010-02-05T10:36:15Z | 2,206,585 | <pre><code> >>> from itertools import dropwhile
>>> def find_value(l, key):
... return dropwhile(lambda x: key not in x, l).next()[key]
>>> find_value([{'id':44}, {'name':'alexa'},{'color':'blue'}], "id")
</code></pre>
<p>This will do a linear search, but only until the element is foun... | 2 | 2010-02-05T10:44:42Z | [
"python",
"list",
"dictionary"
] |
How do I do this with Python list? (itemgetter?) | 2,206,543 | <pre><code>[{'id':44}, {'name':'alexa'},{'color':'blue'}]
</code></pre>
<p>I want to select whatever in the list that is "id".
Basically, I want to print 44, since that's "id" in the list.</p>
| 2 | 2010-02-05T10:36:15Z | 2,206,882 | <p>All the other answers solve your problem, I am just suggesting an alternative way of going about doing this.</p>
<p>Instead of having a <code>list</code> of <code>dict</code>s where you query on the key and have to iterate over all <code>list</code> items to get values, just use a <code>dict</code> of <code>list</c... | 4 | 2010-02-05T11:38:53Z | [
"python",
"list",
"dictionary"
] |
How do I do this with Python list? (itemgetter?) | 2,206,543 | <pre><code>[{'id':44}, {'name':'alexa'},{'color':'blue'}]
</code></pre>
<p>I want to select whatever in the list that is "id".
Basically, I want to print 44, since that's "id" in the list.</p>
| 2 | 2010-02-05T10:36:15Z | 2,206,888 | <p>Probably this is the best solution:</p>
<pre><code>>>> L = [{'id':44}, {'name':'alexa'},{'color':'blue'}]
>>> newd = {}
>>> for d in L:
... newd.update(d)
>>> newd['id']
44
</code></pre>
| 3 | 2010-02-05T11:39:24Z | [
"python",
"list",
"dictionary"
] |
How do I do this with Python list? (itemgetter?) | 2,206,543 | <pre><code>[{'id':44}, {'name':'alexa'},{'color':'blue'}]
</code></pre>
<p>I want to select whatever in the list that is "id".
Basically, I want to print 44, since that's "id" in the list.</p>
| 2 | 2010-02-05T10:36:15Z | 2,210,082 | <pre><code>>>> L = [{'id':44}, {'name':'alexa'},{'color':'blue'}]
>>> newd=dict(d.items()[0] for d in L)
>>> newd['id']
44
</code></pre>
| 0 | 2010-02-05T20:10:21Z | [
"python",
"list",
"dictionary"
] |
Accessing C header magic numbers/flags with Cython | 2,206,557 | <p>Some standard C libraries that I want to access with Cython have a ton of flags. The Cython docs state that I must replicate the parts of the header I need. Which is fine when it comes to functions definitions. They are usually replicated everywhere, docs included. But what about all those magic numbers? </p>
<p>If... | 4 | 2010-02-05T10:40:27Z | 2,206,641 | <p>There are several possible alternatives:</p>
<ol>
<li>Use the flags from the Python <a href="http://docs.python.org/library/mmap.html#module-mmap" rel="nofollow"><code>mmap</code></a> module.
<ul>
<li>simple</li>
<li>only works when there are existing Python bindings</li>
</ul></li>
<li>Use the Python <code>mmap</c... | 1 | 2010-02-05T10:57:02Z | [
"python",
"header-files",
"cython"
] |
Accessing C header magic numbers/flags with Cython | 2,206,557 | <p>Some standard C libraries that I want to access with Cython have a ton of flags. The Cython docs state that I must replicate the parts of the header I need. Which is fine when it comes to functions definitions. They are usually replicated everywhere, docs included. But what about all those magic numbers? </p>
<p>If... | 4 | 2010-02-05T10:40:27Z | 2,206,674 | <p>Write a file foo.c with this as the contents:</p>
<pre><code>#include <sys/mman.h>
</code></pre>
<p>Then run</p>
<pre><code>cpp -dM foo.c | grep -v __ | awk '{if ($3) print $2, "=", $3}' > mman.py
</code></pre>
<p>which will create a python file that defines all the constants from mman.h</p>
<p>Obvious... | 1 | 2010-02-05T11:04:45Z | [
"python",
"header-files",
"cython"
] |
Accessing C header magic numbers/flags with Cython | 2,206,557 | <p>Some standard C libraries that I want to access with Cython have a ton of flags. The Cython docs state that I must replicate the parts of the header I need. Which is fine when it comes to functions definitions. They are usually replicated everywhere, docs included. But what about all those magic numbers? </p>
<p>If... | 4 | 2010-02-05T10:40:27Z | 2,212,283 | <p>To use these constants from Cython, you don't need to figure exactly where they came from or what they are any more than you do from C. For example, your .pxd file can look like</p>
<pre><code>cdef extern from "foo.h":
void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset)
cdef in... | 6 | 2010-02-06T06:29:59Z | [
"python",
"header-files",
"cython"
] |
pyqt jpeg support not working in bundled form | 2,206,737 | <p>To enable jpeg support in a PyQT application, you have to manually include the <code>qjpeg4.dll</code>.<br>
It works fine when the dll and pyd file are not bundled together in the final exe. For example
with py2exe you can do the following :</p>
<pre><code>DATA=[('imageformats',['C:\\Python26/Lib/site-packages/PyQt... | 0 | 2010-02-05T11:18:24Z | 2,222,063 | <p>Try adding <code>pyqt4</code> as a package to force py2exe to include everything from PyQT in your build, like this:</p>
<pre><code>options={"py2exe":{
"includes":["sip"],
"excludes":MODULE_EXCLUDES,
"packages":["PyQt4"],
"bundle_files":1,
"compressed":False,
"xref":T... | 0 | 2010-02-08T14:08:46Z | [
"python",
"pyqt4",
"py2exe"
] |
pyqt jpeg support not working in bundled form | 2,206,737 | <p>To enable jpeg support in a PyQT application, you have to manually include the <code>qjpeg4.dll</code>.<br>
It works fine when the dll and pyd file are not bundled together in the final exe. For example
with py2exe you can do the following :</p>
<pre><code>DATA=[('imageformats',['C:\\Python26/Lib/site-packages/PyQt... | 0 | 2010-02-05T11:18:24Z | 10,738,567 | <p>I've got the same problem, As I know, py2exe has provided the clue:
<a href="http://www.py2exe.org/index.cgi/Py2exeAndPyQt" rel="nofollow">http://www.py2exe.org/index.cgi/Py2exeAndPyQt</a></p>
<p>It reads:
......so you'll need to copy the folder PyQt4\plugins\imageformats to \imageformats. ....... <strong>This won'... | 2 | 2012-05-24T13:34:54Z | [
"python",
"pyqt4",
"py2exe"
] |
Verify RTSP service via URL | 2,207,110 | <p>I am trying to verify that a video service is provided from an URL in python. I am asking does anyone know of any good libraries to use or a way to do this. I have not found much info for this on the web.</p>
<p>Thanks </p>
| 3 | 2010-02-05T12:23:36Z | 2,221,371 | <p>If you try to validate the URL itself as a valid RTSP URL, I think that it's only the protocol token that changes from <code>http://</code> to <code>rtsp://</code> or <code>rtspu://</code>, and implicitly, the default port is no longer 80, but 554.</p>
<p>See <a href="http://www.ietf.org/rfc/rfc2326.txt" rel="nofol... | 1 | 2010-02-08T12:01:09Z | [
"python",
"url",
"video-streaming",
"rtsp"
] |
Verify RTSP service via URL | 2,207,110 | <p>I am trying to verify that a video service is provided from an URL in python. I am asking does anyone know of any good libraries to use or a way to do this. I have not found much info for this on the web.</p>
<p>Thanks </p>
| 3 | 2010-02-05T12:23:36Z | 2,242,875 | <p>Digging around on StackOverflow I came across a previous question asking for an <a href="http://stackoverflow.com/questions/1452710/rtsp-library-in-python-or-c-c/1452756">RTSP library in Python or C/C++ </a>.</p>
<p>Linked there is an <a href="http://www.flumotion.net/doc/flumotion/reference/trunk/flumotion.twisted... | 3 | 2010-02-11T07:28:10Z | [
"python",
"url",
"video-streaming",
"rtsp"
] |
Verify RTSP service via URL | 2,207,110 | <p>I am trying to verify that a video service is provided from an URL in python. I am asking does anyone know of any good libraries to use or a way to do this. I have not found much info for this on the web.</p>
<p>Thanks </p>
| 3 | 2010-02-05T12:23:36Z | 2,247,454 | <p>If you do not want to use a library, as suggested by synack, you can open a socket connection to the given URL and send an RTSP DESCRIEBE request. That is actually quite simple since RTSP is text-based HTTP-like. You would need to parse the response for a meaningful result, e.g look for the presence of media streams... | 3 | 2010-02-11T20:21:02Z | [
"python",
"url",
"video-streaming",
"rtsp"
] |
Verify RTSP service via URL | 2,207,110 | <p>I am trying to verify that a video service is provided from an URL in python. I am asking does anyone know of any good libraries to use or a way to do this. I have not found much info for this on the web.</p>
<p>Thanks </p>
| 3 | 2010-02-05T12:23:36Z | 2,421,464 | <p>I don't believe Live555 provides a python library. However, they do provide source code that can be compiled to build openRTSP. This is a simple command-line utility that will perform the entire RTSP handshake to connect to the server and begin streaming to the client. It also can provide statistic measurements (... | 0 | 2010-03-10T23:29:19Z | [
"python",
"url",
"video-streaming",
"rtsp"
] |
Send invitation emails on post_save or all at once in django view? | 2,207,250 | <p>There's a requirement in a web app I'm building about the possibility of the user sending join invitations to his friends. These invitations are stored in the database through the <code>Invitation</code> model. The user can send multiple invitations at once.</p>
<p>What do you think is more appropriate: sending all... | 2 | 2010-02-05T12:50:36Z | 2,207,343 | <p>If this is live application and user experience is important, then I suggest you avoid sending anything email-related in post_save handlers, or even in views.</p>
<p>Reasons are: SMTP can go down, network connection can go down, network can be up but speed can be that of a snail etc. In each of those cases either y... | 6 | 2010-02-05T13:06:51Z | [
"python",
"django",
"email",
"notifications"
] |
Python - best way to set a column in a 2d array to a specific value | 2,207,283 | <p>I have a 2d array, I would like to set a column to a particular value, my code is below. Is this the best way in python?</p>
<pre><code>rows = 5
cols = 10
data = (rows * cols) *[0]
val = 10
set_col = 5
for row in range(rows):
data[row * cols + set_col - 1] = val
</code></pre>
<p>If I want to set a number of ... | 7 | 2010-02-05T12:56:32Z | 2,207,301 | <p>There's nothing inherently wrong with the way you're using, except that it would be clearer to name the variable<code>set_col</code> than <code>set_row</code> since you're setting a column.</p>
<p>So set a number of columns, just wrap it with another loop:</p>
<pre><code>for set_col in [...columns that have to be ... | 0 | 2010-02-05T12:59:40Z | [
"python",
"multidimensional-array"
] |
Python - best way to set a column in a 2d array to a specific value | 2,207,283 | <p>I have a 2d array, I would like to set a column to a particular value, my code is below. Is this the best way in python?</p>
<pre><code>rows = 5
cols = 10
data = (rows * cols) *[0]
val = 10
set_col = 5
for row in range(rows):
data[row * cols + set_col - 1] = val
</code></pre>
<p>If I want to set a number of ... | 7 | 2010-02-05T12:56:32Z | 2,207,315 | <p>A better solution would be:</p>
<pre><code>data = [[0] * cols for i in range(rows)]
</code></pre>
<p>For the values of <code>cols = 2</code>, <code>rows = 3</code> we'd get:</p>
<pre><code>data = [[0, 0],
[0, 0],
[0, 0]]
</code></pre>
<p>Then you can access it as:</p>
<pre><code>v = data[row][co... | 10 | 2010-02-05T13:02:05Z | [
"python",
"multidimensional-array"
] |
Python - best way to set a column in a 2d array to a specific value | 2,207,283 | <p>I have a 2d array, I would like to set a column to a particular value, my code is below. Is this the best way in python?</p>
<pre><code>rows = 5
cols = 10
data = (rows * cols) *[0]
val = 10
set_col = 5
for row in range(rows):
data[row * cols + set_col - 1] = val
</code></pre>
<p>If I want to set a number of ... | 7 | 2010-02-05T12:56:32Z | 2,207,396 | <p>In your case rows and columns are probably interchangeable, i.e. it's matter of semantics which is which. If this is the case, then you could make columns to occupy sequence of cells in <code>data</code> list, and then zero them using just:</p>
<pre><code> data[column_start:column_start+rows] = rows * [0]
</code><... | 0 | 2010-02-05T13:16:52Z | [
"python",
"multidimensional-array"
] |
Python - best way to set a column in a 2d array to a specific value | 2,207,283 | <p>I have a 2d array, I would like to set a column to a particular value, my code is below. Is this the best way in python?</p>
<pre><code>rows = 5
cols = 10
data = (rows * cols) *[0]
val = 10
set_col = 5
for row in range(rows):
data[row * cols + set_col - 1] = val
</code></pre>
<p>If I want to set a number of ... | 7 | 2010-02-05T12:56:32Z | 2,207,401 | <p>An earlier answer left out a <code>range</code>, so you could try the following:</p>
<pre><code>cols = 7
rows = 8
data = [[0] * cols for i in range(rows)]
val = 10
set_col = 5
for row in data:
row[set_col] = val
</code></pre>
<p>to extend this to a number of columns you could store the column number and it'... | 0 | 2010-02-05T13:17:30Z | [
"python",
"multidimensional-array"
] |
Python - best way to set a column in a 2d array to a specific value | 2,207,283 | <p>I have a 2d array, I would like to set a column to a particular value, my code is below. Is this the best way in python?</p>
<pre><code>rows = 5
cols = 10
data = (rows * cols) *[0]
val = 10
set_col = 5
for row in range(rows):
data[row * cols + set_col - 1] = val
</code></pre>
<p>If I want to set a number of ... | 7 | 2010-02-05T12:56:32Z | 2,207,432 | <p><a href="http://numpy.scipy.org/">NumPy</a> package provides powerful N-dimensional array object. If <code>data</code> is a <code>numpy</code> array then to set <code>set_col</code> column to <code>val</code> value:</p>
<pre><code>data[:, set_col] = val
</code></pre>
<p>Complete Example: </p>
<pre><code>>>... | 23 | 2010-02-05T13:24:51Z | [
"python",
"multidimensional-array"
] |
How to write dynamic Django models? | 2,207,562 | <p>what i want, is to receive advices to define a re-usefull Product model, for a shopping site app, nowadays I know that the store is going to commerce with "clothing", so the product model will have a "season or collections" relationship, but in the future I should use that app to commerce with X product, e.g: "cars"... | 1 | 2010-02-05T13:44:51Z | 2,207,718 | <p>One, popular, option would be to use something like tags. So you'd have the stuff that's common to all items, like an item ID, name, description, price. Then you'd have some more generic tags or described tags in another table, associated with those items. You could have a tag that represents the season, or autom... | 0 | 2010-02-05T14:11:01Z | [
"python",
"django"
] |
How to write dynamic Django models? | 2,207,562 | <p>what i want, is to receive advices to define a re-usefull Product model, for a shopping site app, nowadays I know that the store is going to commerce with "clothing", so the product model will have a "season or collections" relationship, but in the future I should use that app to commerce with X product, e.g: "cars"... | 1 | 2010-02-05T13:44:51Z | 2,207,911 | <p>One way to define relationships between one object and many other types of objects is to use a <a href="http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1" rel="nofollow"><code>GenericForeignKey</code></a> and the <a href="http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/" rel="nofollow"... | 3 | 2010-02-05T14:40:40Z | [
"python",
"django"
] |
Date versus time interval plotting in Matplotlib | 2,207,670 | <p>The pyplot plot_date function expects pairs of dates and values to be plotted with a certain line style. Is there a recommended approach to plot multiple values or interval data against date/time values?</p>
| 4 | 2010-02-05T14:02:32Z | 2,448,086 | <p>To plot interval data, you may use the error bar provided by the <strong>errorbar()</strong> function and the use <strong>axis.xaxis_date()</strong> to make matplotlib format the axis like <strong>plot_date()</strong> function does.</p>
<p>Here is an example:</p>
<pre><code>#!/usr/bin/python
import datetime
impor... | 5 | 2010-03-15T15:05:21Z | [
"python",
"matplotlib"
] |
Using a method in a model to count objects filtered by the primary key | 2,207,875 | <p>I wanted to use a method as part of my model to count all the occurrences of the object in another table that references it as a foreign key.</p>
<p>Will the below work?</p>
<pre><code>class Tile(models.Model):
#...
def popularity(self):
return PlaylistItem.objects.filter(tile__exact=self.id).count... | 0 | 2010-02-05T14:36:03Z | 2,207,913 | <p>When you create a <code>ForeignKey</code>, Django creates a backref on referenced model for you, so you could just do:</p>
<pre><code>def popularity(self):
return self.playlistitem_set.count()
</code></pre>
<p>See <a href="http://docs.djangoproject.com/en/1.1/topics/db/queries/#backwards-related-objects" rel="... | 4 | 2010-02-05T14:41:04Z | [
"python",
"django",
"django-models"
] |
Does Ruby support conditional regular expressions | 2,208,071 | <p>Just a language feature question, I know there's plenty of ways to do this outside of regexes (or with multiple regexes).</p>
<p>Does ruby support <a href="http://perldoc.perl.org/perlre.html#(%3f(condition)yes-pattern%7cno-pattern)" rel="nofollow">conditional regular expressions</a>? Basically, an IF-THEN-ELSE br... | 3 | 2010-02-05T15:02:25Z | 2,208,110 | <p>No, ruby does not support that (neither in 1.8 nor 1.9).</p>
| 3 | 2010-02-05T15:09:03Z | [
"python",
"ruby",
"regex",
"conditional"
] |
Does Ruby support conditional regular expressions | 2,208,071 | <p>Just a language feature question, I know there's plenty of ways to do this outside of regexes (or with multiple regexes).</p>
<p>Does ruby support <a href="http://perldoc.perl.org/perlre.html#(%3f(condition)yes-pattern%7cno-pattern)" rel="nofollow">conditional regular expressions</a>? Basically, an IF-THEN-ELSE br... | 3 | 2010-02-05T15:02:25Z | 5,054,663 | <p>FWIW, Python started to support this starting in 2.4:
<a href="http://docs.python.org/library/re#regular-expression-syntax" rel="nofollow">http://docs.python.org/library/re#regular-expression-syntax</a></p>
| 0 | 2011-02-20T01:14:40Z | [
"python",
"ruby",
"regex",
"conditional"
] |
How to make a multi choice form field on app engine | 2,208,207 | <p>I'm building an application on app Engine and I want to make a form field with multiple choices.<br />
Here is my form (it uses django.newforms from the app engine sdk (django 0.96)) :</p>
<pre><code>from google.appengine.ext.db import djangoforms
from django import newforms
class KeywordForm(djangoforms.ModelForm... | 1 | 2010-02-05T15:20:17Z | 2,208,714 | <p>I've found a solution !</p>
<p>The problem is <i>self.request.POST</i> dictionnary provided to my form's constructor.<br />
It's format is not appreciated by <i>MultipleChoiceField.clean()</i> function, so I transformed it.</p>
<p>Here is the working validation code :</p>
<pre><code> args = self.request.arguments... | 2 | 2010-02-05T16:41:24Z | [
"python",
"google-app-engine",
"django-forms"
] |
App engine - Uploading a large file and parsing data from it onto the datastore | 2,208,546 | <p>I have a file that contains ~16,000 lines of information on entities. The user is supposed to upload the file using an HTML upload form, then the system handles this by reading line by line and creating then put()'ing entities onto the datastore.</p>
<p>I'm limited by the 30 second request time limit. I have tried ... | 0 | 2010-02-05T16:13:49Z | 2,208,879 | <p>To solve a similar problem, I stored the dataset in a model with a single TextProperty, then spawn a taskqueue task that:</p>
<ol>
<li><p>Fetches a dataset from the datastore if there are any left.</p></li>
<li><p>Checks if the length of the dataset is <= N, where N is some small number of entities you can put()... | 2 | 2010-02-05T17:03:17Z | [
"python",
"google-app-engine",
"upload"
] |
App engine - Uploading a large file and parsing data from it onto the datastore | 2,208,546 | <p>I have a file that contains ~16,000 lines of information on entities. The user is supposed to upload the file using an HTML upload form, then the system handles this by reading line by line and creating then put()'ing entities onto the datastore.</p>
<p>I'm limited by the 30 second request time limit. I have tried ... | 0 | 2010-02-05T16:13:49Z | 2,220,898 | <p>If you're doing this to bulk load data, why not use <a href="http://code.google.com/appengine/docs/python/tools/uploadingdata.html" rel="nofollow">the bulk loader</a>?</p>
<p>If you need the interface to be accessible to non-admin users, then, as suggested, you need to break the file up into decent sized chunks (by... | 0 | 2010-02-08T10:30:29Z | [
"python",
"google-app-engine",
"upload"
] |
How to use Django templatetags in static media files? | 2,208,551 | <p>Im using a flash gallery and the settings xml file is stored in /media/xml/gallery.xml</p>
<p>In the gallery.xml file I want to add this snippet of code: </p>
<pre><code><items>
{% for image in images %}
<item source="{{ MEDIA_URL }}{{ image.image }}" thumb="" description="{{ image.title }}" />... | 0 | 2010-02-05T16:14:12Z | 2,208,589 | <p>You will have to serve this document via a Django view, and render it as a template.</p>
| 2 | 2010-02-05T16:19:34Z | [
"python",
"django",
"templates",
"tags",
"media"
] |
How to use Django templatetags in static media files? | 2,208,551 | <p>Im using a flash gallery and the settings xml file is stored in /media/xml/gallery.xml</p>
<p>In the gallery.xml file I want to add this snippet of code: </p>
<pre><code><items>
{% for image in images %}
<item source="{{ MEDIA_URL }}{{ image.image }}" thumb="" description="{{ image.title }}" />... | 0 | 2010-02-05T16:14:12Z | 2,208,598 | <p>Static media is, by definition, static. If you want Django mechanisms to work then you need to process using Django.</p>
| 2 | 2010-02-05T16:21:17Z | [
"python",
"django",
"templates",
"tags",
"media"
] |
Django unable to open sqlite on SOME queries only? | 2,208,643 | <p>I have had no troubles locally, but pushing a new project to an existing machine (one running plenty of other django apps without trouble) gave this:</p>
<pre><code>OperationalError: unable to open database file
</code></pre>
<p>What is more perplexing is:</p>
<ul>
<li>The sqlite file is read-write for all</li>
<... | 1 | 2010-02-05T16:31:01Z | 2,208,842 | <p>Write access on the directory. I thought i checked that first :-/</p>
| 0 | 2010-02-05T16:57:33Z | [
"python",
"django",
"sqlite"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 2,208,869 | <p>I guess you should look in <code>os.environ['PROGRAMFILES']</code> for the program files folder.</p>
| 36 | 2010-02-05T17:01:15Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 2,208,946 | <p>There should be a directory under Windows 64bit, a Folder called <code>\Windows\WinSxS64</code> for 64 bit, under Windows 32bit, it's WinSxS.</p>
<p>Hope this helps.</p>
| -2 | 2010-02-05T17:10:48Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 2,209,083 | <p><a href="http://docs.python.org/library/platform.html"><code>platform</code> module</a> -- Access to underlying platformâs identifying data</p>
<pre><code>>>> import platform
>>> platform.architecture()
('32bit', 'WindowsPE')
</code></pre>
<p>On 64-bit Windows, 32-bit Python returns:</p>
<pr... | 17 | 2010-02-05T17:31:16Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 2,209,113 | <p>You should be using environment variables to access this. The program files directory is stored in the environment variable <code>PROGRAMFILES</code> on x86 Windows, the 32-bit program files is directory is stored in the <code>PROGRAMFILES(X86)</code> environment variable, these can be accessed by using <code>os.env... | 3 | 2010-02-05T17:37:56Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 2,383,258 | <p>The subject lines asks about detecting 64 or 32bit OS, while the body talks about determining the location of ProgramFiles. The latter has a couple of workable answers here. I'd like to add another solution generalized to handle StartMenu, Desktop, etc. as well as ProgramFiles: <a href="http://stackoverflow.com/ques... | 2 | 2010-03-04T22:40:11Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 3,740,665 | <p>Many of these proposed solutions, such as platform.architecture(), fail because their results depend on whether you are running 32-bit or 64-bit Python.</p>
<p>The only reliable method I have found is to check for the existence of os.environ['PROGRAMFILES(X86)'], which is unfortunately hackish.</p>
| 4 | 2010-09-18T06:42:05Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 4,836,508 | <p>64-bit versions of Windows use something called registry redirection and reflection keys. There is a compatibility layer called WoW64 which enables compatibility of 32-bit applications. Starting from Windows 7 and Windows Server 2008 R2 WoW64 registry keys are not longer reflected but shared. You can read about it h... | 0 | 2011-01-29T11:04:36Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 5,838,022 | <p>Came here searching for properly detecting if running on 64bit windows, compiling all the above into something more concise. </p>
<p>Below you will find a function to test if running on 64bit windows, a function to get the 32bit Program Files folder, and a function to get the 64bit Program Files folder; all regardl... | 24 | 2011-04-29T22:27:39Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 7,260,315 | <pre><code>def os_platform():
true_platform = os.environ['PROCESSOR_ARCHITECTURE']
try:
true_platform = os.environ["PROCESSOR_ARCHITEW6432"]
except KeyError:
pass
#true_platform not assigned to if this does not exist
return true_platform
</code></pre>
<p><a href="htt... | 7 | 2011-08-31T16:32:26Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 12,578,715 | <p>I think the best solution to the problem has been posted by Mark Ribau.</p>
<p>The best answer to the question for Python 2.7 and newer is:</p>
<pre><code>def is_os_64bit():
return platform.machine().endswith('64')
</code></pre>
<p>On windows the cross-platform-function <code>platform.machine()</code> interna... | 21 | 2012-09-25T08:08:36Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 23,818,280 | <pre><code> import _winreg
def get_registry_value(key, subkey, value):
key = getattr(_winreg, key)
handle = _winreg.OpenKey(key, subkey )
(value, type) = _winreg.QueryValueEx(handle, value)
return value
windowsbit=cputype = get_registry_value(
"HKEY_LOCAL_MACHINE",
"SYSTEM\\CurrentControl... | 0 | 2014-05-22T22:45:19Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 24,944,155 | <p>Following <a href="http://docs.python.org/library/platform.html#cross-platform" rel="nofollow">this documentation</a>, try this code:</p>
<pre><code>is_64bits = sys.maxsize > 2**32
</code></pre>
| 1 | 2014-07-24T21:19:20Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 26,643,471 | <p>This works for me in the Python versions I use: 2.7 and 2.5.4</p>
<pre><code> import win32com.client
import _winreg
shell = win32com.client.Dispatch('WScript.Shell')
proc_arch = shell.ExpandEnvironmentStrings(r'%PROCESSOR_ARCHITECTURE%').lower()
if proc_arch == 'x86':
print "32 bit"
... | 0 | 2014-10-30T01:18:38Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 27,478,189 | <p>When you need to find out things about windows system, it is usually somewhere in the registry, according to MS documentation, you should look at (<a href="http://support.microsoft.com/kb/556009" rel="nofollow">http://support.microsoft.com/kb/556009</a>) this key value:</p>
<p><strong>HKLM\HARDWARE\DESCRIPTION\Syst... | 1 | 2014-12-15T05:57:41Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 30,642,434 | <p>Just to update this old thread - it looks like the platform module reports the correct architecture now (at least, in Python 2.7.8):</p>
<pre><code>c:\python27\python.exe -c "import platform; print platform.architecture(), platform.python_version()"
('32bit', 'WindowsPE') 2.7.6
c:\home\python278-x64\python.exe -c ... | 1 | 2015-06-04T11:16:37Z | [
"python",
"windows",
"64bit"
] |
Detect 64bit OS (windows) in Python | 2,208,828 | <p>Does anyone know how I would go about detected what bit version Windows is under Python. I need to know this as a way of using the right folder for Program Files.</p>
<p>Many thanks</p>
| 26 | 2010-02-05T16:55:56Z | 37,668,875 | <pre><code>import struct
def is64Windows():
return struct.calcsize('P') * 8 == 64
</code></pre>
| 0 | 2016-06-07T00:46:22Z | [
"python",
"windows",
"64bit"
] |
Access remote computer to launch Python script without disturbing user | 2,208,944 | <p>First, I'll admit this is <a href="http://superuser.com/questions/105252/use-remote-computer-without-disturbing-local-user">cross-posted at SuperUser</a> but I decided to also post here as my objective is programming related and this community might have better solution scenarios than just the one I'm thinking of.</... | 0 | 2010-02-05T17:10:41Z | 2,209,045 | <p>How about wrapping their execution within <a href="http://msdn.microsoft.com/en-us/library/h976cd1t%28VS.85%29.aspx" rel="nofollow">Remote WSH</a>? Not sure about the monitoring part, although I suppose you could simply have your scripts create a log on the remote machine, and then you can "tail" it in realtime whil... | 1 | 2010-02-05T17:25:33Z | [
"python",
"windows-7",
"remote-desktop"
] |
Access remote computer to launch Python script without disturbing user | 2,208,944 | <p>First, I'll admit this is <a href="http://superuser.com/questions/105252/use-remote-computer-without-disturbing-local-user">cross-posted at SuperUser</a> but I decided to also post here as my objective is programming related and this community might have better solution scenarios than just the one I'm thinking of.</... | 0 | 2010-02-05T17:10:41Z | 2,209,103 | <p>Further searching yielded this which exactly addresses using Media Center and remote connections:
<a href="http://www.missingremote.com/index.php?option=com_content&task=view&id=3692&Itemid=232" rel="nofollow">http://www.missingremote.com/index.php?option=com_content&task=view&id=3692&Itemid=... | 0 | 2010-02-05T17:35:48Z | [
"python",
"windows-7",
"remote-desktop"
] |
Access remote computer to launch Python script without disturbing user | 2,208,944 | <p>First, I'll admit this is <a href="http://superuser.com/questions/105252/use-remote-computer-without-disturbing-local-user">cross-posted at SuperUser</a> but I decided to also post here as my objective is programming related and this community might have better solution scenarios than just the one I'm thinking of.</... | 0 | 2010-02-05T17:10:41Z | 2,209,171 | <p>For running remote python I like <a href="http://codespeak.net/execnet/" rel="nofollow">execnet</a>. It gives you the option of running code on any "ssh"able connection or if you are on a local network a little <a href="http://codespeak.net/execnet/example/test_info.html#instantiate-gateways-through-sockets" rel="no... | 1 | 2010-02-05T17:47:01Z | [
"python",
"windows-7",
"remote-desktop"
] |
Access remote computer to launch Python script without disturbing user | 2,208,944 | <p>First, I'll admit this is <a href="http://superuser.com/questions/105252/use-remote-computer-without-disturbing-local-user">cross-posted at SuperUser</a> but I decided to also post here as my objective is programming related and this community might have better solution scenarios than just the one I'm thinking of.</... | 0 | 2010-02-05T17:10:41Z | 2,209,344 | <p>I use <a href="http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx" rel="nofollow">psexec</a> to run remote commands on Windows machines.</p>
| 0 | 2010-02-05T18:15:35Z | [
"python",
"windows-7",
"remote-desktop"
] |
Accessing autoconf defined symbols in python | 2,208,979 | <p>I'm working on a project that is written in both C++ and python. I have the following line in my configure.ac:</p>
<pre><code>AC_INIT(MILHOUSE, 0.3.6)
</code></pre>
<p>which means that in the config.h generated by running configure, i have the following define line:</p>
<pre><code>/* Define to the version of this... | 0 | 2010-02-05T17:14:58Z | 2,209,841 | <p>The examples page of the <a href="http://pyparsing.wikispaces.com" rel="nofollow">pyparsing wiki</a> includes <a href="http://pyparsing.wikispaces.com/file/view/macroExpander.py" rel="nofollow">this example</a> of a macro expander. Here is the sample code that it processes:</p>
<pre><code>#def A 100
#def ALEN A+1
... | 0 | 2010-02-05T19:34:13Z | [
"python",
"c",
"autotools",
"autoconf"
] |
Accessing autoconf defined symbols in python | 2,208,979 | <p>I'm working on a project that is written in both C++ and python. I have the following line in my configure.ac:</p>
<pre><code>AC_INIT(MILHOUSE, 0.3.6)
</code></pre>
<p>which means that in the config.h generated by running configure, i have the following define line:</p>
<pre><code>/* Define to the version of this... | 0 | 2010-02-05T17:14:58Z | 2,211,433 | <p><code>AC_INIT</code> not only defines preprocessor symbols, it also defines output variables. When you list a file, let's call it <code>somefile</code>, in your <code>AC_CONFIG_FILES</code> macro, your <code>configure</code> script looks for a file called <code>somefile.in</code>, and replaces the names of any outpu... | 3 | 2010-02-06T00:32:53Z | [
"python",
"c",
"autotools",
"autoconf"
] |
Accessing autoconf defined symbols in python | 2,208,979 | <p>I'm working on a project that is written in both C++ and python. I have the following line in my configure.ac:</p>
<pre><code>AC_INIT(MILHOUSE, 0.3.6)
</code></pre>
<p>which means that in the config.h generated by running configure, i have the following define line:</p>
<pre><code>/* Define to the version of this... | 0 | 2010-02-05T17:14:58Z | 14,687,653 | <p>Adding to the <a href="http://stackoverflow.com/a/2211433/447356">accepted answer</a>: if you are interested in a custom defined variable, be sure to use <code>AC_SUBST</code> in addition to <code>AC_DEFINE[_UNQUOTED]</code> else nothing is replaced in your config files. Using the hints from <a href="http://stackove... | 0 | 2013-02-04T13:20:14Z | [
"python",
"c",
"autotools",
"autoconf"
] |
web ERP in django where do i start? | 2,209,125 | <p>I'm a computer science student doing my bachelor's degree. i'm interested in doing an simple application like an ERP in django. I've got about a month of time don't know where do i start. please do give in your opinion.</p>
| 3 | 2010-02-05T17:39:19Z | 2,209,132 | <p>The django <a href="http://docs.djangoproject.com/en/dev/intro/tutorial01/" rel="nofollow">tutorial</a> is great.</p>
| 5 | 2010-02-05T17:40:42Z | [
"python",
"django",
"web-applications"
] |
web ERP in django where do i start? | 2,209,125 | <p>I'm a computer science student doing my bachelor's degree. i'm interested in doing an simple application like an ERP in django. I've got about a month of time don't know where do i start. please do give in your opinion.</p>
| 3 | 2010-02-05T17:39:19Z | 2,209,276 | <p>There's a <a href="http://djangobook.com/" rel="nofollow">Django Book</a> It's an awsome introductory material.</p>
<p>Like @pace says (vote up!) the django tutorial is fine too (although the rest of the documentation assumes you have all the time of the world to comprehend it)</p>
<p>But my recommendation is take... | 4 | 2010-02-05T18:04:33Z | [
"python",
"django",
"web-applications"
] |
web ERP in django where do i start? | 2,209,125 | <p>I'm a computer science student doing my bachelor's degree. i'm interested in doing an simple application like an ERP in django. I've got about a month of time don't know where do i start. please do give in your opinion.</p>
| 3 | 2010-02-05T17:39:19Z | 5,646,003 | <p>Have a look at <a href="http://code.google.com/p/serpantin/" rel="nofollow">"serpantin"</a>, as they claim, it is a small ERP application written in Django... That will give a good start for your ERP....</p>
| 1 | 2011-04-13T07:48:38Z | [
"python",
"django",
"web-applications"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.