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...
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], [...
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...
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...
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([])...
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"...
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...
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? '...
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...
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?