Questions tagged as 'python'

1
answer

"for" doubt in python

I'm starting to program with python language, and one of my exercises is to do the factorial number of a number n This is my code: result=1 n=input("Deme un numero \n") for i in range (1,n): result=result*i print(result) my question is h...
asked by 10.10.2018 / 00:07
0
answers

What does "libpng warning: iCCP: known incorrect sRGB profile" mean?

The game works and everything but once you lose or win this message seems to you in the compiler (In my case I use spyder) libpng warning: iCCP: known incorrect sRGB profile libpng warning: iCCP: known incorrect sRGB profile libpng warning: iC...
asked by 10.10.2018 / 01:39
1
answer

How does self work in python? [duplicate]

I would like to know how self works in python, I know that it has to do something with the classes but I do not have it so clear and I need to know to convert it into an arrangement, here there is little of the code class Button(pygame.sprit...
asked by 07.10.2018 / 06:44
0
answers

convert image rgb2hsv

def hsv_to_rgb(R,G,B): def get_H(): if B < G: return get_c() else: return 360 - get_c() def get_S(): if R+G+B == 0: return "undef" return 1-(3/(R+G+B))*min(R, G, B)...
asked by 08.10.2018 / 23:02
1
answer

Remove column from a matrix

Passing a csv to an array with pandas creates a column to the left of everything indicating the row number that it is. How could it be eliminated? def cargar(): print("Indica la ruta donde se encuentra el CSV\n") print("Si desea salir puls...
asked by 08.10.2018 / 23:25
0
answers

UnicodeDecodeError: 'ascii' codec can not decode byte 0xc3 in position 18: ordinal not in range (128)

Well no idea what happened, change the code to another folder to send it and I have given these errors No se puede cargar imagen: mmempty.png Traceback (most recent call last): File "C:\Python27\lib\site-packages\IPython\core\interactiveshell...
asked by 08.10.2018 / 23:28
0
answers

Alternative to time.sleep ()

I have a program that is constantly checking if something on the screen has changed place with a while and I would like to do a function that executes an action and waits for the seconds that I indicate to execute it again, the problem th...
asked by 13.10.2018 / 10:52
0
answers

Concurrency issues with Gunicorn + firebase + kubernetes in gcp

I am currently developing an API in Python 3 with Django that is mounted on Kubernetes in Google cloud, using asynchronous workers with gunicorn (Gevent). The problem is that I have a Post method which makes a validation to firebase to search...
asked by 13.10.2018 / 18:11
0
answers

Show only the desired items - OpenCV

The thing is that I've wanted to show the elements that interest me. Let me explain, I have applied a threshold to only see completely white elements. (Having previously applied a gray filter) _,threshold_frame = cv2.threshold(gray,2...
asked by 07.10.2018 / 17:49
0
answers

Error trying to download data from ERA 5, "[Errno 2] No such file or directory: '/home/vinci/.ecmwfapirc'"

When I try to download datasets of ERA 5 I get the following error:    [Errno 2] No such file or directory: '/home/vinci/.ecmwfapirc' This happens when you run the python script in the terminal. What could be happening?    ...
asked by 25.10.2018 / 00:30