Tagged Questions
Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use. Please mention the version that you are using when asking a question about Python.
1
vote
1answer
15 views
Using variable in regular expression in Python
I've looked at several posts and other forums to find an answer related to my ?, but nothing has come up specific to what I need. As a heads up, I'm new to programming and don't possess the basic ...
0
votes
0answers
18 views
Python “in memory DB style” data types
I am creating a weather station using a Raspberry Pi. I have a mySQL database setup for the different sensors (temp, humidity, pressure, rain, etc) and am now getting to processing the wind sensors.
...
2
votes
1answer
13 views
python 3.3: struct.pack won't accept strings
I'm trying to use struct.pack to write a padded string to a file but it seems with the 3.x interpreters this doesn't work anymore. An example of how I'm using it:
mystring = anotherString+" sometext ...
0
votes
0answers
3 views
tornado memory leaks when serve html5 page with <video>
I was writing a static file server with tornado, but memory leaks when it serves html5 videos, the code is pretty simple.
server.py
import tornado.ioloop
import tornado.web
if __name__ == ...
0
votes
0answers
26 views
Python-list is too large and can't be deleted
I have an iterator/generator which yields 'events'. An event consists of a name, a timestamp and a value. I want to store them in NumPy arrays.
This is done in _LoadTriples():
def ...
0
votes
0answers
6 views
Extracting and plotting tabulated plaintext data using Python 3
For the purposes of clarity I have created a gist containing an example of the format of data I am referring to:
https://gist.github.com/TestAcc7777/5823760
After some other irrelevant data, the ...
0
votes
2answers
26 views
Print all Unique Values in a Python Dictionary
I'm struggling with a minor problem in Python (my program is in version 3.2.3 right now).
I have a dictionary that looks like this (this is just an example, actually taken from another post here):
...
0
votes
0answers
3 views
Error when using musixmatch python wrapper
I have been trying to use the the musixmatch python wrapper but I am getting a strange error when trying to run the example. Can anybody shed some light on what is happening?
$ python
Python 2.6.6 ...
0
votes
0answers
5 views
finding corresponding pixels before and after scipy.ndimage.interpolate.rotate
I hope this hasn't already been answered but I haven't found this anywhere.
My problem is quite simple : I'm trying to compute an oblic profile of an image using scipy.
One great way to do it is to :
...
1
vote
0answers
7 views
Django TimeLimitExceeded error
Today I got an error email from Celery, can someone explain it and possibly how I can fix the timeout issue? It would be very helpful, Thank you.
PS my message seems to have sent despite this error, ...
0
votes
2answers
12 views
Concatenating Columns Pandas
This should be an easy one, but I'm drawing a blank:
Can be any number of columns(I will be able to know that number beforehand), but here is an example on 2 only:
2013-06-18 21:46:33.422096-05:00 1 ...
0
votes
3answers
39 views
Run multiple functions in a for loop python
Here is the start of my program. I want a lot of the functions to be inside the for loop as seen in the 3rd function here. How do I go about this?
#!/usr/bin/env python
from rdflib import URIRef, ...
0
votes
2answers
22 views
Internal min function of python
I need to know how the min function of python works if there are more than one item in a list which are minimum. Which one takes min? Say A = [5, 3, 1, 4, 1]. Now if I say A.remove(min(A)) which one ...
1
vote
1answer
28 views
Python: search longest palindromes within a word and palindromes within a word/string
So here is a code i have written to find palindromes within a word (To check if there are palindromes within a word including the word itself)
Condition: spaces inbetween characters are counted and ...
1
vote
1answer
15 views
Trying to get acronyms from nltk
I am relatively new and learning python. I am trying to write an app that will take a word provided by the user and give some alternate suggestions on the word. It seems that nltk has most of what I ...