Questions tagged as 'python'

1
answer

Integrals defined in python - Area under standard normal curve

I have two arrays with values x and y, "x" (value of random variable) are input values, and "y" are values calculated as a function of x (normal probability density function for x). How can I calculate the integral of "y" for a range of values i...
asked by 28.05.2018 / 16:13
1
answer

error in execution of the main class

Good thing my problem is that when wanting to execute a class from the main I have problems to print and execute it class Persona(object): #Definimos un constructor que recibe nombre y edad def __init__(self,nombre,edad): self.nombre=nombr...
asked by 31.05.2018 / 20:51
1
answer

Erro in suds when consulting wsdl

I'm migrating some projects to python on sql 2017, and I ran into a problem about the suds library. EXEC sp_execute_external_script @language = N'Python', @script = N' from suds.client import Client url="https://graphical.weather.gov/xml/SOA...
asked by 27.05.2018 / 17:28
1
answer

Filter information in python dictionaries dynamically

First of all, I want to say that I am understanding how to filter the information in the Python dictionaries from a JSON and then write them in a JSON file. I take a normal workflow on the basis that we do not always know exactly what we should...
asked by 24.07.2018 / 18:28
1
answer

How to read txt file and put value to the python input

Hello, my problem is that I do not know how to do so that when reading the file the values enter the input as an option, the file.txt I put it in the same folder of the program for now I can read files but I can not do that their content are inp...
asked by 10.05.2018 / 15:34
1
answer

Search for url and replace with another in txt with python

I have a .txt file that contains several urls, among all I want to find those that end with zip and rar extension, then change the domain / ip for another and finally save in the same file. Example of file.txt: Lorem ipsum dolor sit amet, c...
asked by 18.05.2018 / 00:20
2
answers

Repair infinite while loop

I have this program to solve within the resolution I have a loop while infinite and I do not know how to put it, because if I use a break I leave the funcion and I can not continue entering data to my program. It has to b...
asked by 18.05.2018 / 07:35
1
answer

threads in PyQt - TypeError: function () missing 2 required positional arguments:

Good afternoon, I hope someone can help me with this error: The code is executed but it throws me an error: from PyQt5.QtWidgets import QMainWindow,QApplication, QTableWidgetItem from PyQt5 import uic import firebase_admin from firebase_admin...
asked by 20.07.2018 / 07:52
2
answers

IndexError when saving variables in a list

I get a series of values (they are outlines of an image) and I keep them in a list called contours . What I intend after that is if there are contours, that is to say that the list is greater than 0, go through this list, and keep saving a s...
asked by 14.10.2018 / 13:34
1
answer

print SyntaxError: invalid syntax

Good morning! I am currently learning Python and in a simple application of practice I found the following error: File "ruta_fichero", line 9 print(num2, "es menor que ", str(num1)) ^ SyntaxError: invalid syntax The code that...
asked by 15.10.2018 / 23:33