Skip to content

Instantly share code, notes, and snippets.

View init27's full-sized avatar
🍵

Sanyam Bhutani init27

🍵
View GitHub Profile
@init27
init27 / app.py
Last active February 13, 2024 14:39
ArXiv Chat: Chat with the latest Arxiv papers
# Credit 🙏: I just used the example from langchain docs and it works quite well: https://python.langchain.com/en/latest/use_cases/question_answering.html
# Note 2: The Arxiv -> PDF logic is a bit messy, I'm sure it can be done better
# Note 3: Please install the following:
# To run:
# Save this in a `app.py`
# pip install arxiv PyPDF2 langchain chromadb
# The chat feature was shipped in H2O nightly this week, we will need to install from nightly link:
@init27
init27 / Sobel.py
Last active August 31, 2018 16:57
import argparse
import cv2
import numpy as np
image = cv2.imread("data/blur.jpg")
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imshow("Original", image)
ap = argparse.ArgumentParser()
@init27
init27 / blur.py
Last active September 2, 2018 06:47
import argparse
import cv2
image = cv2.imread("data/ResizedImage.jpg")
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imshow("Original", image)
kernelSizes = (15, 15)
blurred = cv2.blur(image, kernelSizes)
cv2.imshow("Average (15, 15)", blurred)
@init27
init27 / gray.py
Last active August 31, 2018 16:59
import argparse
import cv2
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True, help="Path to the image")
args = vars(ap.parse_args())
image = cv2.imread(args["image"])
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
cv2.imshow("Original", image)