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.
0
votes
0answers
7 views
Django cannot display model data with dynamic fields
My Directories app has a predefined variety of different models each of which needs to be selected and returned with its corresponding objects. As a result, since my models are plenty and the user ...
0
votes
0answers
13 views
Get all tagged text under li tags
I have list like:
<ul>
<li><strong>Text 1</strong></li>
<li>Text 2</li>
<li>Text 3</li>
<li><strong>Text 4</strong></li>
...
-1
votes
0answers
10 views
python pandas aggregating non numeric types
I have the following problem, I managed to create a data frame with object dtypes on some columns.
In particular these would be 2d numpy arrays but they could be any non-numeric type. Now I want to ...
0
votes
0answers
13 views
How To Use Http Push With Python Server And Android Client
I have a simply Http Server written by Python's BaseHTTPRequestHandler.
With a client written by Java in Android with HttpClient.
And I want to push data from python server to client java:
So I try to ...
0
votes
3answers
18 views
Removing punctuation and creating a set from words from user input
I was wondering how I might go about removing punctuation from user input and creating a set from the words in the input. So far I have this.
input_set = set(self.entry.get().lower().split(' '))
0
votes
0answers
10 views
I have got an anoying celeryd worker restart issue with exitcode 1 or 15
I am using celery 3.0.21 with redis as backend,here is my celery config:
celery = Celery('cpps',
broker='redis://127.0.0.1:6379/1',
backend='redis://127.0.0.1:6379/1',
...
1
vote
4answers
24 views
Finding index of a dictionary in a list by key value
How could I find the index of 'node4' in my dataset a? I want node4 to be my input for this particular function.
ex:
a = [
{'node1':['node2','node3','node5']},
...
0
votes
1answer
21 views
python: chain elements of a tuple in a list of tuples
I want to find combinations of elements in a string. baseString is of variable length e.g. 'tbyhn' or 'tg' or so on.
I tried:
import itertools
baseString = 'tgby'
prd = [it for it in ...
0
votes
0answers
26 views
python - inner join 3 classes
I have a problem, I don't know how to do an inner join (without sql) in python/django...
This is my classes :
class A(models.Model):
parameter1 = models.CharField()
class B(models.Model):
...
0
votes
1answer
20 views
Extract data from PDF: Apache Tika, PDFBox, BeautifulSoup
So I want to extract text from fancy PDF's (with raw text, graphs, charts, tables etc.)
Now what have I done & what I know?
(1) I have used some online conversion tools to convert PDF to HTML ...
0
votes
0answers
40 views
Increase the speed of execution of program
I am using html php and python for sentiment analysis of tweets
HTML for front End
Php as an Interface between python script and html
Python has main sentiment analysis code
it is taking much ...
0
votes
1answer
5 views
FLANN Python Bindings Mac OS X
I've installed FLANN with the following command:
brew install flann --enable-python
But I cannot import the module from within Python:
In [4]: import pyflann
...
0
votes
1answer
24 views
Create a larger matrix from smaller matrices in numpy
I have 3 matrices A,B,C. I wish to create a larger matrix of the form
D = | 0 A |
| B C |
How to do this in Numpy ?
0
votes
1answer
42 views
create an array and store in a different function
I am a beginner creating a program in python. This program creates an array in main and prompts the user to enter 5 integers and stores them in a array in a different function. It then creates a ...
1
vote
0answers
18 views
python module level logging
Can I use ContextFilters in python logging to change loglevels based on modulenames. So something like
class ContextFilter(logging.Filter):
CMDID_cf="IAMTEST1"
def __init__(self, CMDID1):
...