Questions tagged as 'python-3.x'

1
answer

Rank the indexes of a list in Python 3

For example I have a list [6,4,3,9,1] The answer to this would be the index of the highest value of this list in order of example for the list above [1,3,2,0,4] These are the indexes of the places where their indexes are, so I've done...
asked by 01.09.2018 / 23:25
1
answer

Know if client is connected to the server

I have a client and a server connected through the socket module in python3, server side I know when the client connects, but on the client side I have no messages when the client connects and would like to have this information on the side of t...
asked by 27.07.2018 / 13:32
1
answer

run python on another machine

Is it possible to run a python script on another machine on the network? Example: I use the machine dev01 and I need to execute a script for data collection and data on machine BD03 both machines have python installed and everything correct,...
asked by 10.07.2018 / 01:13
1
answer

Python - Strings and files

I'm starting to learn Python files. What suggestions would you give to improve the code and make it prettier or smaller? """ A ACME Inc., uma empresa de 500 funcionários, está tendo problemas de espaço em disco no seu servidor de arquivos. Para...
asked by 19.09.2018 / 23:56
4
answers

Regex in Python to find several possible names

I need to find the judge's name on a labor file, but first I need to know if he is a Judge, Rapporteur, Rapporteur, or Judge. I'm using the following Regex: f_regex = re.compile(r'ju(iz|íza) relato(r|a) | ju(iz|íza) | relato(r|a) | desembar...
asked by 20.12.2017 / 18:56
1
answer

I wanted to make a magic square, where I put 9 numbers, and the sum of them has to result 15 (in the horizontal and vertical)

Good evening guys, I have this array: Ineedtheaddedarraynumberstoall15.Bothverticallyandhorizontally.Code:importnumpyasnpimportrandomfromtabulateimporttabulatea=[1,2,3,4,5,6,7,8,9]random.shuffle(a)data=np.reshape(a,(3,3))soma_horizontal=[]fo...
asked by 25.12.2017 / 01:36
1
answer

PYTHON - selenium proxy configuration

I'm trying to implement proxy configuration in firefox via selenium but when I open the page, setup works. Here is the test I did to access a site that verifies the ip. profile = webdriver.FirefoxProfile() profile.set_preference('general.usera...
asked by 11.04.2018 / 23:59
1
answer

variable can not admit another value [closed]

n=int(input("jogadas:")) a=22695477 b=1 m=2**32 semente=3 i=1 num=None num_aleatorio = None lance_computador = None while i <= n: lance_jogador=int(input("Faça sua jogada")) if i==1: num = semente else: num = num...
asked by 02.04.2018 / 13:07
1
answer

Formatting float number in list

I have a dataframe with columns of Latitude and Longitude, in the format string Atibaia['LATITUDE'].head() 140 -231,124,852,387,647 245 -231,159,749,902,692 254 -23,116,747,205 512 -231,560,912,572,211 1348 -23,11...
asked by 30.03.2018 / 04:06
1
answer

Scraping data from a site with dynamic tables filtering [closed]

The platform of search of the programs conceptualized in Capes has a dynamic filtering for the own query. I would like to know how I collect the data from an output using Python. Why, using just the bs4 libs and requests I can not get output of...
asked by 06.06.2017 / 23:37