Skip to content

Instantly share code, notes, and snippets.

View shubhpy's full-sized avatar

Shubhanshu Soni shubhpy

View GitHub Profile
@shubhpy
shubhpy / youtube-mp3.py
Created August 31, 2020 08:13
Download a list of Youtube Video's as MP3
# Setup Steps for Mac
# 1. sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
# 2. sudo chmod a+rx /usr/local/bin/youtube-dl
# 3. brew install ffmpeg
import subprocess
urls = [
"https://www.youtube.com/watch?v=ABCDEDFGH"
]
@shubhpy
shubhpy / CreateTestImages.py
Created May 23, 2018 06:18
Create Images written 1,2,3.. on it for testing
# -*- coding: utf-8 -*-
from PIL import Image, ImageDraw,ImageFont
import boto3
import PIL.Image
def handler():
fontpath = "Roboto/Roboto-Medium.ttf"
for i in range(1,101):
im = Image.open("whiteimage.png")
draw = ImageDraw.Draw(im)
@shubhpy
shubhpy / download_s3_folder
Last active April 4, 2024 08:18
Python script to download a S3 folder on the web. This file downloads all files in the userImages folder and save locally on the backend server. Later zipped folder is uploaded back on the S3 and download link is generated.
#!/usr/bin/env python3
import time
import os
import zipfile
import shutil
import errno
folder_name = "local_folder_name" #_where_all_files need to save