Questions tagged as 'python'

1
answer

Image segmentation with Canny Edge opencv

I'm trying to target both the iris and pupil edge using opencv's Canny Edge, but all of the parameters I've used do not meet the criteria of making the two borders well delimited. The only way I found of segmenting at least the edge of the iris...
asked by 01.11.2018 / 04:41
1
answer

Static Variable in Python

I came from Java. I have a variable in a class that I need to change in more than one method. I tried to put it global, but it consumed a lot of resources. How to implement this? Would it be the same shape as a static variable in Java?...
asked by 17.04.2014 / 02:29
2
answers

How do I run a subprocess with administrator permission?

I'm doing a script that accesses cmd of Windows, via subprocess . But I need to run cmd as an administrator. The solution I found is not satisfying to me, which would be to use runas . What I want to know is if there...
asked by 21.02.2014 / 22:01
1
answer

Save multiple figures in a loop - Python

I'm using python to analyze experimental data. I have in a folder several data files that, in the script, are grouped according to some criteria. I use a loop to read all the files in the folder, and within the loop, data from the same group is...
asked by 27.02.2014 / 22:40
1
answer

Printing all the attributes of a class [duplicate]

I have the following class: class Usuario(object): def __init__(self): self.Nome = '' self.Email = '' self.SalarioBruto = 0.0 self.SalarioLiquido = 0.0 self.Cargo = '' self.Despesas = Despe...
asked by 17.09.2018 / 23:58
1
answer

Error [Forbidden] when submitting event in google calendar, API googleCL

For those who do not know, googleCl (Command line tools for the Google Data APIs) follows the link I use only the command that sends an event to my google calendar. I now have an error message, where previously it ran normal,  simply s...
asked by 14.04.2015 / 22:58
1
answer

Hexagonal Matrix in Python

I would like to know how I could return the numbers of a vector of vectors (array) within a specific R (radius) using Python. Based on this image: Followingthevectorused:mapa=[[0.0,0.1,0.2,0.3,0.4,0.5,0.6],[1.0,1.1,1.2,1.3,1.4,1.5,1.6],[2...
asked by 29.05.2018 / 19:52
1
answer

Convert PDF to Text with Python

Well, I have a PDF file that is in a website, I would like to know how to get the text from this PDF and put it in a variable. Access the site with the PDF I know, my difficulty is in converting this PDF into text, or simply copying the text....
asked by 10.09.2017 / 07:45
1
answer

In Python do we have the switch function? [duplicate]

In Python we have the function switch ? I wanted to create a program but I did not want to use many if , and for that the switch function helps, but I have already seen several videos of Python classes and no talk of swit...
asked by 10.06.2017 / 00:03