Questions tagged as 'python'

1
answer

Problem with the classifier in PLN

I'm developing a chatbot, and to get the answer I'm using the Naive Bayes classifier by sorting the questions and answers. For those who want to see the whole project code and more definitions follow the link GitHub To develop I am using th...
asked by 25.07.2017 / 04:58
1
answer

How can a colormap of a surface be mapped to a scalar function?

Translation of question I asked no OS : I have a scalar function that represents the electrical potential on a spherical surface. I want to plot, for a given radius, the surface and map its color points based on the potential function. Ho...
asked by 01.05.2017 / 16:45
1
answer

Problem with the Requests package

I'm starting with Debian 8 and I'm trying to run a code in Python, but the error always appears:    No module named request. I have already checked several ways to try to fix using pip install ... The requests package is installed B...
asked by 28.05.2017 / 20:11
1
answer

Put password in a python file

I'm doing a program in which you select the file you want to block using a password, by clicking a button that file is locked with a user-defined password. How can I make this file accessible only with the password?     
asked by 04.04.2017 / 20:07
1
answer

How to use the Selenium WebDriver findElement (By.xpath ())?

Hello, please, I'm trying to get information from a public site: name of a vote, date and table with list of votes This site: link I used Python 3, selenium webdriver and PhantomJS: from selenium import webdriver path_to_phantomjs = '...
asked by 31.10.2017 / 11:47
2
answers

How to perform an arithmetic operation by changing numerous fields in the database efficiently?

There is a table with 200 records and one of the fields is responsible for indicating the order that these data are displayed (0, 1, 2, 3, 4, 5, ...). I need to rearrange this data, pick up the record from position 167 and put it in position 3,...
asked by 25.08.2017 / 02:49
2
answers

How to install Numpy via PIP windows 7 64 bit [closed]

Good afternoon how do I install Numpy via pip. I downloaded Python 2.7.13 and I do not know how to install via pip.     
asked by 02.06.2017 / 17:46
1
answer

Is this a gambiarra? [closed]

I'm starting on programming, I have some difficulty reading even my codes after a while. I was one of the researched readability and came across the term "gambiarra". this has raised me a question. What exactly defines a gambiarra and how...
asked by 09.06.2017 / 16:21
1
answer

Python - filtering data into text files

I'm trying to write a code to read a .txt file and extract numeric coordinates, except that this file contains lines with text as well. I can not do the filter. see a part of the file. So far I have been able to write the following: file...
asked by 06.06.2017 / 23:56
2
answers

How to extract all td names in order?

I need to extract all the names of people on this site: Camara.gov.br I wrote this code in Python3: from urllib.request import urlopen from bs4 import BeautifulSoup import urllib.request, urllib.parse, urllib.error emendas = urlopen("...
asked by 19.09.2017 / 13:42