I have some .CAP files that came from capturing packages with tcpdump. When trying to open with wireshark, the machine gets very slow, as I imagine it will try to load everything into RAM.
I would like to write a program in Python to work mor...
I need to remove the duplicate dates from the dataframe and add the values corresponding to those dates.
I found an answer in the NA stack that is close to the one I need, but I could not shape it for my need:
df.groupby('data', group_keys=...
I have a script written in Python (3.6) that works normally if run on my PC (which has Python installed)
My question is: If I run it on some other windows that do not have python installed, will it run normally? And if it does not work, is...
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 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...
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...
I have already seen in some codes, mainly in Django the dunders __copy__ and __deepcopy__ , the idea behind them I understand that provide copies of the object, but usually the dunders can be called say say% with% d of som...
def fib(n):
a, b = 0, 1
while a < n:
print(a, end=' ')
a, b = b, a+b
print()
result- > 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597
But if I declare variables a and b on different lines, it b...