Skip to content

Instantly share code, notes, and snippets.

@cshjin
cshjin / Makefile
Created March 18, 2015 22:26
C Based Server TCP demo
all: webserver
webserver: webserver.o tcp.o request.o
gcc webserver.o tcp.o request.o -o webserver -g -lpthread
webserver.o: webserver.c
g cc -Wall -g -c webserver.c -o webserver.o
tcp.o: tcp.c tcp.h
gcc -Wall -g -c tcp.c -o tcp.o
@JayantGoel001
JayantGoel001 / Automate WhatsApp.py
Created January 5, 2021 15:06
Automate WhatsApp using Python and pywhatkit
import pywhatkit as kt
import getpass as gp
from datetime import datetime,timedelta
print("Let's Automate Python")
p_num = gp.getpass(prompt="Phone Number:",stream=None)
msg = "Hello Coders!! \nIt's Jayant"
@JayantGoel001
JayantGoel001 / Turn Image into Cartoon.ipynb
Last active January 18, 2022 13:15
Generating Cartoon Images using python and opencv
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JayantGoel001
JayantGoel001 / Convert Image into ASCII Art.py
Created January 6, 2021 14:07
Convert image into ASCII Art
import pywhatkit as kt
import matplotlib.pyplot as plt
filename = input("Enter the filename : ")
target_image = filename.split('.')[0] + ".txt"
img = plt.imread(filename)
plt.imshow(img)
plt.show()
@JayantGoel001
JayantGoel001 / Creating Image & Audio Captcha.ipynb
Last active November 9, 2023 01:25
Creating Image and Audio Captcha using python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JayantGoel001
JayantGoel001 / Creating An Audio Book From PDF.py
Last active January 18, 2022 13:15
Creating An Audio Book from a PDF File using pyttsx3 and PyPDF2
import pyttsx3
import PyPDF2
book = open('poem.pdf', 'rb')
pdf_reader = PyPDF2.PdfFileReader(book)
num_pages = pdf_reader.numPages
play = pyttsx3.init()
print("Play the audio book")
@JayantGoel001
JayantGoel001 / Digital Clock.py
Created January 8, 2021 19:24
Creating A Digital Clock using tkinter
from tkinter import *
from time import strftime
def clock():
current_time = strftime('%H:%M:%S %p')
label.config(text=current_time)
label.after(1000, clock)
@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)
@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 / 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:")