Questions tagged as 'python-3.x'

0
answers

Render html file in template in django

I have a class in Django that models a Post and would like to allow a user to upload a file but how do I render that file in the django template ??? class Article(DateAbstractModel): 'Modelo de um artigo do site' name = models.CharFi...
asked by 26.05.2018 / 03:20
1
answer

Can you reference an enum within itself in Python?

I would like to use a constant that I created in one enum as an attribute of another, for example: from enum import Enum class Jokenpo(Enum): PEDRA = ('Rock', [Jokenpo.PAPEL], [Jokenpo.TESOURA]) PAPEL = ('Paper', [Jokenpo.TESOURA], [...
asked by 01.06.2018 / 04:08
0
answers

Help with Python and Selenium

I work with server monitoring and whenever a service crashes, I need to click on a link to be responsible for the server. I was able to create a script in Python + Selenium that accesses the monitoring page and is clicking every 5 seconds on the...
asked by 25.05.2018 / 01:30
1
answer

Code mandelbrot set

I am studying a specific code of the mandelbrot set (equation with complex numbers) focusing on object-oriented programming. However, there is a specific part that I did not understand from the code, as below: columns = 2000 rows = 2000 res...
asked by 02.06.2018 / 16:16
1
answer

How to find the largest value in an array? [duplicate]

Well, I have a 3x4 array and I want to know how to develop a python code to get the highest value from this array. My code done so far was this: LINHAS = 3 COLUNAS = 4 LINHA_ MatrizM = [] for i in range(LINHAS): MatrizM.append([])...
asked by 06.06.2018 / 18:15
0
answers

Decode json and use proxy on request

I have a proxy api with return in json. Return of the proxy api (example): { "proxy": "170.79.201.54:20183", "ip": "170.79.201.54", "port": "20183", "connectionType": "Residential", "type": "elite", "lastChecked"...
asked by 20.05.2018 / 04:20
0
answers

TypeError: importPoisson () takes 1 positional argument but 2 were given

I'm trying to import some data from an external file to be able to generate a graphic and such, but every time of that error, follows my code: You can also talk about errors that you found in my code that can be improved, I'm starting in pyth...
asked by 26.05.2018 / 16:16
1
answer

Can I set the other to do two things?

I want to do a function in case the name entered is invalid, the program shows that the name is invalid and in addition, close the program or return to the starting point, is it possible in Python? carro = str(input('Qual carro você alugou? '...
asked by 26.05.2018 / 17:07
0
answers

Metrics per recipient on Amazon SES

I'm using Amazon's Simple Email Service to send transactional emails. For this, I created a Python class that uses the AWS SDK for Python, Boto3. One of the parameters of this class, recipients, represents a list of recipients who will receiv...
asked by 16.05.2018 / 01:50
0
answers

Error trying to install mySQL-Connector-Python

I have installed Python version 3.6.5, and I decided to install "mysql-connector-python-8.0.11-py3.6", but it returns an error that does not find such version installed, do I specifically need of version 3.6.5 of mysql to run?     
asked by 23.05.2018 / 02:56