Questions tagged as 'python'

2
answers

Error with arrays in Python

I am trying to obtain the determinant of a matrix with the help of numpy.linalg.det (matrix) this is the code: from sympy import * #from numpy import * import numpy as np from matplotlib import * from py_expression_eval import * import matplot...
asked by 06.05.2017 / 17:58
2
answers

Django: Error matching query does not exist

This code throws me the error:    matching query does not exist Apparently the filter I have designed does not capture the id of the Orders. Code: models.py: class Pedido(models.Model): especialidad = models.ForeignKey('Especi...
asked by 05.03.2017 / 23:43
2
answers

package python project within an .exe

Good morning, I want to package a python project within 1 exe I know that with pyinstaller and py2exe it can be done but I need that only generates 1 exe and not the other libraries that generate these programs thank you very much in advance   ...
asked by 22.02.2017 / 17:10
2
answers

How to solve this query set? [duplicate]

I have a problem where I want to subtract two fields and then update a record, which would be cantidad - stock , and the latter would be the modified one, here the model: models.py: class Pedido(models.Model): especialidad = m...
asked by 13.02.2017 / 15:15
2
answers

How to unify words that are the same but are written differently?

For a program I need to put values of a file in a list. What happens is that there are words like Real-Madrid , real madrid, madrid, etc ... that since they are all the same should appear only once, but when comparing it in python, a == b...
asked by 10.02.2017 / 21:23
1
answer

Spam filter, operation of MultinomialNB (sklearn.naive_bayes)

I have to do a spam filter in python using scikit-learn, and I do not know how the function multinomialnb.fit(x,y) works. What parameters should I put as x e y ? I have all the ham and spam data with countvectorizer...
asked by 27.01.2017 / 22:17
2
answers

csv data file as array in Python

Hello everyone I have a question, I have a data file of 4 columns (time, x, y, z) and I made an array to divide the time into small parts / strips and I want to count the data numbers that there are part / fringe I thought I would use a counter...
asked by 20.01.2017 / 22:50
1
answer

Can I configure a Raspberry Pi card from a PC with Windows Operating System?

I intend to start a project with a Rasberry Pi using Python language, however I understand that the Rasberry Pi can only be configured with Linux and on my laptop I only own Windows 10. Is this an inconvenience? When entering the Raspberry pi...
asked by 30.04.2017 / 22:43
1
answer

Error using a constructor in python 2.7

I was doing an object-oriented python 2.7 work, I'm quite new to python, and when I run the code it notifies me of the following error: I am instantiated the object and then serialize it with the "Pickle" module and save it in a file as...
asked by 18.03.2017 / 23:18
4
answers

Make application that runs until a certain time in python

I am trying to make a web spyder that obtains information from the web. The problem is that normally when the program meets its objectives and stops working, however the pages from which I get information are being updated continuously so I want...
asked by 26.12.2016 / 20:29