This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import multiprocessing as mp,os | |
from datetime import timedelta, date | |
import os | |
def daterange(date1, date2): | |
for n in range(int ((date2 - date1).days)+1): | |
yield date1 + timedelta(n) | |
def unwrap_self(cls, kw1, kw2): | |
cls.process_wrapper(kw1, kw2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket, struct | |
def str2ip(ip): | |
"Convert dotted IPv4 address to integer." | |
packedIP = socket.inet_aton(ip) | |
return struct.unpack("!i", packedIP)[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
# pip install emoji | |
import emoji | |
def char_is_emoji(character): | |
return character in emoji.UNICODE_EMOJI | |