Questions tagged as 'python'

0
answers

Split () in a generic Xpath list with python

How can I make a split within a generic list generated through an xpath function in python? When I generate the xpath the string comes all in a single line and I need to separate them as \ n does. abmedList = abmedlistas.xpath('.//p/text()')...
asked by 26.04.2018 / 15:44
1
answer

Converting list to float array

I'm working on a data import, which are in the format, as in the example: [-2.814285863362681, -2.814158589901394, -2.8123844084634873] [-2.874285863362681, -2.054158589901394, -2.6523844084634873] . . . I used this code to import, already...
asked by 30.04.2018 / 16:37
1
answer

Mechanicalsoup Proxy in python

Regarding requests in Python using mechanicalsoup, how do I open the site using a proxy. import mechanicalsoup br = mechanicalsoup.StatefulBrowser() site = 'www.exemplo.com.br' open = br.open(site) resp = open.text print(resp)     
asked by 30.04.2018 / 07:54
0
answers

Retrieve variable values inside a class in a Python function (partial_fit)

I'm creating a new algorithm to run along with the algorithms provided by the sklearn package in python, however the dataset used is extremely large and I'm using the partial_fit function (Example: Naive Bayes link ) so you can get blocks fro...
asked by 23.04.2018 / 06:17
0
answers

Check inactive users in AD using pyad module

Good afternoon, I'm doing a search, in essence it's a program to check users in AD that are inactive and disable them (Windows server 2016), but I'm starting with Python and I discovered this library called pyad. What I wanted is a light for me...
asked by 16.04.2018 / 20:51
3
answers

Python Help: Exercise School year

Hello, I need help with an exercise in Python which is as follows: Exercise School Year • Write a program that asks for the name and date (year, month, and day) of birth of a person. • The program should also request the current da...
asked by 12.04.2018 / 10:32
1
answer

Keras: ValueError: Dimension 0 in both shapes must be equal (VGGNets)

I'm following a tutorial and loaded modelo VGGNet16 pre-trained using Keras vgg16_model = keras.applications.vgg16.VGG16() model = Sequential() for layer in vgg16_model.layers: model.add(layer) model.layers.pop() for layer...
asked by 15.04.2018 / 21:02
0
answers

Random Python Monte Carlo Function

I need to generate random numbers. A number of numbers in the house of 10 ^ 5 and 10 ^ 6 random numbers. The randint function of the random library seems to me not to have a good degree of randomness when it generates so many repeating number...
asked by 12.04.2018 / 21:58
0
answers

How to install websocket-client python through windows 10?

I'm trying to install ws client through windows and I'm not getting it, I did this in cmd >python -m pip install websocket-client and got the following result:    Requirement already satisfied: websocket-client in   c: \ py...
asked by 11.04.2018 / 21:40
1
answer

Error installing Python library

I have python 2.7.14 installed with 9.0.1 pip on a Macbook. I was having an error trying to run the pip.list command from the terminal. I checked into Google that I needed to edit the pip.conf file, but I could not find it. So, I checked the...
asked by 12.04.2018 / 03:25