I am having difficulty converting the code below to Python's 3.4 version, the purpose of this code is to encode and decode hexes in order to create shellcodes .
import binascii, sys, time
RED = '3[31m'
WHITE = '3[37m'
RESET = '3[0;0m'
def...
I want to create a queryset that returns only the cars that had the last approved revision. It is known that there may be n cars, and each car has a history of revisions, so there may be no revisions for each car.
class Carro(models.Model):...
I need to calculate the difference between two dates in python, but always some error.
>>> from datetime import datetime
>>> data1 = datetime(2015, 8, 5, 8, 12, 23)
>>> data2 = datetime(2015, 8, 9, 6, 13, 23)
>>...
I have seen many questions, articles and even some modules in the standard Python library where a term that is "environment variables" is introduced. Here in StackOverflow there are many issues that speak of them, but always on how to manipulate...
Hello, I'd like to understand a little more about strings in PYTHON .
I'm developing a program, which consists of:
Get a STRING
Separate STRING every 3 characters
And save each part in a LIST
EX:
nome = "guilherme"...
I'm having a problem with python \ b (backspace), instead of deleting the previous character, it generates a "•" as shown below:
Thefollowingisthelineofcodethatgeneratesthisreturn:#-*-coding:utf-8-*-importpyodbcimportplatformimportjson#-----...
I have the following sample code:
from Testes import POO
class Fisica(POO.Cliente):
def __init__(self,sexo,nome,idade):
super().__init__(nome,idade)
self.sexo = sexo
Note that the attributes name and age are the attribut...
Hello, I'm using a collector to fetch data from all stackoverflow forum users through the API. But I am suffering from the "quota_max" that are only 300 searches per day. I've tried the Sleep function, put the sink to sleep for up to 300 seconds...
I have a list with approximately 1.5 million values and I need to define the median of this set. The values are stored in a file, such as string , enclosed in single quotation marks (ex. '155' ).
How can I calculate the median of this...