Skip to content

Instantly share code, notes, and snippets.

View saharshg29's full-sized avatar

saharshg29

View GitHub Profile
@saharshg29
saharshg29 / index.js
Created September 21, 2023 08:01
Simple BMI calculator
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BMI Calculator</title>
<style>
body {
@saharshg29
saharshg29 / openCv.py
Created October 4, 2023 20:19
My first realtime object detection using OpenCV
import cv2
import numpy as np
def detect_boxes(image):
# Convert image to HSV color space
hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV)
# Define range for brown color in HSV
lower_brown = np.array([10, 50, 50])
upper_brown = np.array([20, 255, 255])
@saharshg29
saharshg29 / solution.js
Created December 4, 2023 12:57
This is a code snippet for competitive programming using js
// For reading input from the command line
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
// Function to solve the problem
function solve(input) {
@saharshg29
saharshg29 / infinite_scroll.py
Created December 18, 2023 12:40
Infinite Scroll Snippet in Python
import time
import requests
import pandas as pd
from tqdm import tqdm
import chromedriver_binary
from bs4 import BeautifulSoup
from selenium import webdriver
browser = webdriver.Chrome()