Questions tagged as 'python'

0
answers

Problems using the Selenium module with Firefox

I'm using: Debian version 9.6 Python 2.7 Selenium 3.141.0 Firefox 60.3.0 I'm trying to learn how to use Selenium with Python but I have not been able to do anything yet. It always gives some error, I corrected as I found the solutio...
asked by 10.12.2018 / 17:19
0
answers

Interface between python and prolog

Good morning. I need to make the communication between prolog and python. I ended up finding an api pySwip that interfaces between these two technologies, but I can not make it work because prolog needs to be installed as a shared library. I alr...
asked by 17.07.2016 / 16:01
1
answer

Scrapy queue queue and mysql store

I've grouped 2 questions because I think they're related. I've done a script test , where saved links are stored in the database with your data. Is this a bad practice? (High Priority) Do I have to do something more to avoid duplica...
asked by 13.07.2016 / 18:53
0
answers

ImportError on OpenCV installation [closed]

Today I tried to reinstall the opencv library on my computer, I did this for script pip , which I downloaded the file .whl through the site: http://www.lfd.uci.edu/~gohlke/pythonlibs/ . After the library was successfully in...
asked by 04.01.2017 / 20:56
0
answers

Remove the background of an image - python [closed]

I am working on a code to remove the background of an image, I am trying to use the Canny border detector to elaborate a mask and try to remove a piece of pipe from the image: ThecodeI'mworkingonisthis:img=imread('Imagem.jpg')gray=cvtColor(i...
asked by 28.06.2016 / 16:28
1
answer

How to separate each sequence of equal numbers from a string?

How do I split a string of numbers? For example '233' to get ['2','33'] . Since the given values can vary, for example '44446' and give ['4444','6'] or '2345' and give ['2','3','4','5'] . That is, gi...
asked by 15.03.2016 / 14:30
0
answers

Working with vectors [closed]

I need to generate a vector with 100 random number positions and see what the proportion of numbers 2 to every 10 vector positions, the first part I got, but the rest does not help? import random as rd v=[] for i in range(0, 20): w=rd.r...
asked by 30.11.2015 / 21:44
1
answer

Produtory of a function

Hello, I would like to know if there is any command to perform the production of a function in Python. I'm creating a function to make the production of another function. def fx(a, v, t): return ( (t[3]/exp(t[2]-(t[1]/v)))*(a/exp(t[2]-(t[1...
asked by 22.11.2015 / 12:36
1
answer

OSError: [Errno 2] No such file or directory

Good afternoon, I'm trying to emulate an IBM 3270 using lib py3270, however I'm taking error while statipling the class Emulator of this lib. Anyone know what it might be? from py3270 import Emulator def connnect(): em = Emulator(visibl...
asked by 14.12.2015 / 20:57
1
answer

Problems with contour () in python

Hello, I'm having some problems with the contour () function of pylab. In the final image, the x and y axis values are ranging from 0 to 600, which was the amount of intervals in my arange (). However, I wanted the values of x and y (-3 to 3) to...
asked by 31.08.2015 / 03:33