Skip to content

Instantly share code, notes, and snippets.

View JayantGoel001's full-sized avatar
♠️
If I lose it all, slip and fall, I will never look away.

Jayant Goel JayantGoel001

♠️
If I lose it all, slip and fall, I will never look away.
View GitHub Profile
@JayantGoel001
JayantGoel001 / Grab Screenshot.py
Created January 9, 2021 18:14
Grab Screenshot using pyautogui and tkinter to create GUI
import pyautogui
from tkinter import *
win = Tk()
win.title("Grab ScreenShot")
canvas1 = Canvas(win, width=300, height=300)
canvas1.pack()
@JayantGoel001
JayantGoel001 / Youtube Video Downloader.py
Created January 9, 2021 18:00
Download Youtube Videos using pytube
from pytube import YouTube
# pip install git+https://github.com/nficano/pytube.git
url = 'https://www.youtube.com/watch?v=3jZXXIDXZJ8'
video = YouTube(url)
print("**********************VIDEO TITLE**********************")
print(video.title)
print("**********************Thumbnail URL**********************")
@JayantGoel001
JayantGoel001 / GIF.py
Created January 9, 2021 17:34
Creating GIF from a Video using moviepyu
from moviepy.editor import *
clip = VideoFileClip('GIF.mp4')
clip = clip.subclip(2, 5)
clip.write_gif("GIF.gif")
@JayantGoel001
JayantGoel001 / URL Shortner.py
Created January 9, 2021 12:42
Shortening the URL using pyshorteners
import pyshorteners as psh
link = "https://github.com/JayantGoel001"
short = psh.Shortener()
shorted_url = short.tinyurl.short(link)
print(shorted_url)
@JayantGoel001
JayantGoel001 / Translator.py
Created January 9, 2021 12:35
Convert Any Text Language to Any Other Text Language using googletrans
from googletrans import Translator
text = '''
J'ai erré seul comme un nuage
Qui flotte sur les hautes vallées et collines,
Quand tout à coup j'ai vu une foule,
Une foule, de jonquilles dorées;
Au bord du lac, sous les arbres,
flottant et dansant dans la brise.
'''
@JayantGoel001
JayantGoel001 / Jokes Generator.py
Created January 9, 2021 11:02
Generate Jokes using pyjokes
import pyjokes
jokes = pyjokes.get_jokes(category='all')
for i in range(len(jokes)):
print(i+1, ".", jokes[i])
@JayantGoel001
JayantGoel001 / Instagram Profile Pic Downloader .py
Created January 9, 2021 10:55
Download Instagram Profile Picture using instaloader
from instaloader import Instaloader
insta = Instaloader()
username = input("Enter the Instagram Account username : ")
insta.download_profile(username, profile_pic_only=True)
@JayantGoel001
JayantGoel001 / IP.py
Created January 9, 2021 10:20
Getting IP Address of any website using socket
import socket as sk
try:
hostname = sk.gethostname()
ip_address = sk.gethostbyname(hostname)
print("HostName : "+hostname)
print("IP Address : "+ip_address)
URL = input("Enter a URL:")
@JayantGoel001
JayantGoel001 / UnZip.py
Created January 9, 2021 10:05
Unzipping a zip folder using zipfile and python
import zipfile as z
filename = input()
print("Starting Unzip of Folder.")
files = z.ZipFile(filename)
files.extractall()
print("Unzip Files!!!")
@JayantGoel001
JayantGoel001 / QR Code.py
Created January 8, 2021 19:33
Generating QR Code using pyqrcode and pypng
# pip install pypng
import pyqrcode
data = "Hi!! I am Jayant Goel."
img = pyqrcode.create(data)
img.png("Jayant Goel.png", scale=10)