Questions tagged as 'python'

0
answers

Working with matrices "invalid value encountered in double_scalars"

I am working with matrices and to solve systems of equations, in one part of the code I have factor = (matriz_v[f,k]/matriz_v[k,k]) where I get the error "invalid value encountered in double_scalars" I think it's because he's working...
asked by 12.05.2017 / 01:48
0
answers

How to create a WebSocket connection in Flask without port

I am completely new to Flask and Nginx, apart from this I am trying to use WebSocket and I need to do data transmission through a web page, but without having to specify the port, nor be running it in a virtual environment. I have an Ubuntu s...
asked by 12.05.2017 / 04:41
0
answers

Send e-mail using Mutt in Python

Hi, I'm using Mutt to send an email in a Python script and it works fine. But when I connect by Putty and run the script from Putty when the program reaches the sending part of the email with Mutt it does not send it. If I execute it directly on...
asked by 17.05.2017 / 10:53
1
answer

Get a file and store a string in a Python dictionary

I have a Python script that searches for and replaces a string contained in all files within a directory. Now I need you to store the rest of that line in a dictionary. That is, when I find this line: ORIGIN("ab_220_ABBC2x_5_ABBC2x_Orig...
asked by 07.05.2017 / 12:12
1
answer

OSError: [Errno 22] Invalid argument: './C:\\Python\\\x07file.txt'

I am doing a small program in Python and it throws this error in the second line of code    OSError: [Errno 22] Invalid argument: './C:\Python\\x07file.txt' def funcion(): ruta = open('./%s' % 'C:\Python\\archivo.txt', 'r')...
asked by 06.05.2017 / 00:44
1
answer

Select value by id

I have a question, in my view.py I have a question example ing =ingresos.objects.values('id').annotate(Sum('precio')) works fine but as you will see in the tamplete I "paint" all the values in the database, how could that query to only s...
asked by 02.05.2017 / 14:27
2
answers

Measure distance using an ultrasound sensor in Python

I'm trying to measure a distance with the ultrasound sensor and everything looks good, but when I leave the program for a few minutes (3-4 minutes) of work, the program stops measuring the distance. I need the program to not stop becaus...
asked by 05.05.2017 / 12:53
0
answers

Reorder data from a text file to columns

I need to reorder the data I have in a text file, everything is mixed, without separators and I do not have the knowledge to separate the data by types in different columns, one column for str and another one for float . The file...
asked by 17.05.2017 / 19:27
1
answer

How to group grouped values by different date by a single value per hour

Good, I need to show the number of calls that are made every hour in a whole month. So far I was able to do a resample of the CSV so that I stayed as follows: Cantidad Fecha 2017-03-01 00:00:00 5 2017-03-01 01:00:0...
asked by 04.05.2017 / 23:25
1
answer

How to set a very long text by default in a field in Odoo8?

Good morning, I am working with the selection and recruitment module of odoo8 ... the problem is that I have a text that is too long (one page or so) and the bosses hate to be copying / pasting that text every time they make a new record ......
asked by 12.05.2017 / 16:58