I'm running a code that sets the hours in the terminal but when I use the code below it brings me a totally wrong value at the time:
Code:
from time import gmtime, strftime
print(strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime()))
Here is...
I have a question and a great difficulty creating a program that reads 2 files, example doc1.txt and doc2.txt , inside the files it has the following data:
doc1.txt doc2.txt
1 1
1 2
2 5
3...
I'm learning programming with Python 3.6 and I'm taking part in a challenge site.
I need to find the smallest number whose value corresponds to its index in a list. If the list contains only one element, it should return the same. If there is...
My intention is to do as in the figure below:
link
My role:
def translacao(imagem1):
imagem1.save("translate.png")
destino = Image.open("translate.png")
destino = destino.resize((400,400))
#Tamanho Imagem - Largura e Al...
I'm having a problem using numpy's fft function.
When rotating it, the answer is giving different from the Fourier transform that I implemented manually and by the tests I did the manual seems correct. I think I'm using fft the wrong way.
impo...
I would like to know if there is a possibility of using filter with a lambda function to select a conjunto de dados of a array de J
SON in Python .
Example: I have the following JSON already as dict...
In the code below, I would like to return an instance of the class itself with the data filled in through a text file. The lines are stored this way in the file:
Yug Sekwaf, 13-04-1570,2-34,3: 21,2,34,2.45,3.01,2: 01,2: 01,3: 10,2-22
T...
I ran a simple regression to a database with a product (Product, Volume, Price). It turned perfectly.
But I would like to run the same regression on a base with more products, however, I want to be able to choose the product I want to run the re...
I'm a beginner in the django world and one of the first things I find in tutorials is the term migrate I'd like to know what that means, how to use it and what it's for.