Questions tagged as 'python'

1
answer

Doubts about VsCode [closed]

I'm doing an exercise whose code is as follows: import random n1 = str(input ('Primeiro aluno:')) n2 = str(input ('Segundo aluno:')) n3 = str(input ('Terceiro aluno:')) n4 = str(input ('Quarto aluno:')) lista = [n1,n2,n3,n4] escolhido = random...
asked by 19.02.2018 / 05:02
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

Validate service

I'm having difficulty returning values from the 'psutil' library, I need to create a script that finds a service and returns me whether it is running or not, however the service name changes according to the example user's machine : Machine 01 h...
asked by 06.08.2018 / 16:32
1
answer

How do I resolve this error when I import requests? [closed]

python3.2/site-packages/requests/__init__.py", line 84, in <module> from urllib3.contrib import pyopenssl File "/storage/emulated/0/com.hipipal.qpyplus/lib/python3.2/site-packages/urllib3/contrib/pyopenssl.py", line 147 for prefix...
asked by 21.08.2017 / 18:50
1
answer

User Registration using Django

I have a registration class and a form for this, however I need to register each user using the user that the admin makes available, how do I do this? I have nothing on admin.py yet For example: when I click save I need to save the scholarship h...
asked by 31.07.2017 / 15:17
1
answer

Error creating virtual environment [mkvirtualenv] python 3.6

After installing python 3.6 and then virtualenvwrapper via pip (pip install virtualenvwrapper-win), I tried to create a virtual environment by the "mkvirtualenv name" command and the following error occurred: λ mkvirtualenv django Usin...
asked by 16.07.2017 / 19:48
3
answers

C: \ Users \ Raiqupip install pygame - "The system can not execute the specified program"

I'm trying to download pygame in python 3.6.5 (64-bit) windows 10, but when I open cmd, I try to run the command " pip install pygame " or kivy , or just type " pip " in the cmd, this message appears ... "The system can not exe...
asked by 14.04.2018 / 02:51
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

String within a model in python?

The user enters a string: 'a123' I want the program to identify if this string is in the template a%d , where% d is any number. I need to identify the number as well.     
asked by 24.03.2018 / 17:28