Questions tagged as 'python'

0
answers

Data entry form with Django

Someone can help me, I have the following model: class Citas2(models.Model): laboratorio = models.CharField(max_length=10, default=LABORATORIO_1, null=True) paciente = models.ForeignKey(Pacientes, on_delete=models.CASCADE) doctor =...
asked by 12.07.2018 / 17:20
0
answers

Sort lines of a file

I need the lines that comply lect_linea[0]=='"PseudorangeRateUncertaintyMetersPerSecond"'and float(lect_linea[60])>30 Sort from lowest to highest by the value stored in lect_linea[60] I've tried using: g.write(sorted(linea, key=...
asked by 05.07.2018 / 21:42
0
answers

python - TypeError: Required argument 'flags' (pos 2) not found

My code is for a program that is activated by facial recognition to add two numbers, and shows the result with my voice, but on the line of an audio that appears the following message TypeError: Required argument 'flags' (pos 2) not found...
asked by 09.07.2018 / 02:29
1
answer

How to determine how many times a certain item is repeated within a list? [closed]

In a certain list I want to find those items that are the same to count them. Currently until this code arrives, try to create a counter for the items but I have not succeeded:. def lista_nombres(): nombres = [] while True:...
asked by 12.07.2018 / 15:43
0
answers

flask, send data from one table to another template

I have a table in html, which is filled with data that the user adds, so the table can have an infinite number of rows. this window with the table is started using flask with python, from main.py table.html <div class="row">...
asked by 04.07.2018 / 22:25
1
answer

Query in PostgreSQL returns NoneType

After creating a user in my database in my application implemented in Heroku, I enter the registration page if it succeeds. When I try to log in, make the following query: result = cur.execute("SELECT * FROM users WHERE username = %s", [userna...
asked by 03.07.2018 / 15:28
0
answers

Problem with the index attribute of two DataFrame

I am loading a pair of data sets, one using DataReader and the other one of a csv downloaded from yahoo finance. import datetime as dt import pandas_datareader.data as web import pandas as pd import scipy.stats as stats import matplotlib.pyplo...
asked by 03.07.2018 / 01:26
0
answers

Obtain the GPS sensor reading data every 5 seconds

I am using the GPS sensor NEO and I get the coordinates correctly, I want to capture the reading string every 5 seconds. As I mentioned, I manage to read but I do not capture it every 5 seconds, my program is as follows: import gps import iter...
asked by 03.07.2018 / 03:09
0
answers

Access the Google Cloud Compute Engie console and run a file

I want to access the console of an instance in Google Cloud Engine. I still can not do it. I need to run a file that is on a server and that it starts the instance, after starting it run another file that is in the last instance. I have already...
asked by 04.07.2018 / 03:04
1
answer

wxpython how to import button actions from another py file

Hello, my question is a strange thing, but if in wxpython I have created a window in the main.py file import wx import wx.xrc #from accion import evento class MyFrame(wx.Frame): def __init__(self, parent): wx.Frame.__init__(self,...
asked by 03.07.2018 / 02:26