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 json | |
import requests | |
from PIL import Image | |
import base64 | |
import urllib.parse | |
import re | |
def image_base64_data(image_path): | |
with open(image_path, 'rb') as img_file: | |
image_data = img_file.read() |
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 os | |
from dateutil.tz import tzlocal | |
import time | |
import logging | |
import traceback | |
import multiprocessing | |
from apscheduler.schedulers.background import BlockingScheduler | |
from concurrent.futures.thread import ThreadPoolExecutor | |
import http.client as httplib | |
from concurrent.futures import as_completed |
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 asyncio | |
import pathlib | |
import os | |
import time | |
import multiprocessing | |
from functools import wraps | |
from concurrent.futures.thread import ThreadPoolExecutor | |
executor = ThreadPoolExecutor(max_workers=multiprocessing.cpu_count() * 5) |