Skip to content

Instantly share code, notes, and snippets.

View StarkGang's full-sized avatar
🎯
Focusing

Midhun K M StarkGang

🎯
Focusing
View GitHub Profile
@StarkGang
StarkGang / test_google_img_tr.py
Created April 4, 2024 02:47
Returns same image without any translation as for now, needs lot's of tweaks..
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()
@StarkGang
StarkGang / youtube_multithread_with_scheduler_downloader.py
Last active November 24, 2022 05:26
Scheduler based multithreaded youtube_dl downloader
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
@StarkGang
StarkGang / licence_header_adder.py
Created December 22, 2021 14:32
Use this script to add licence header to your python files.
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)