Skip to content

Instantly share code, notes, and snippets.

View Pawandeep-prog's full-sized avatar
:octocat:
available for intern/job/project

Programminghut Pawandeep-prog

:octocat:
available for intern/job/project
View GitHub Profile
package com.programminghut.edge_detector;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.ContextCompat;
import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
person
bicycle
car
motorcycle
airplane
bus
train
truck
boat
traffic light
import cv2
import mediapipe as mp
import pyautogui
import time
def count_fingers(lst):
cnt = 0
thresh = (lst.landmark[0].y*100 - lst.landmark[9].y*100)/2
import pandas as pd
import numpy as np
from sklearn.linear_model import LinearRegression
import matplotlib.pyplot as plt
df = np.load('archive/olivetti_faces.npy')
df = df.reshape(400, 64*64)
y = np.random.randn(40000).reshape(400,100)
import cv2
cap = cv2.VideoCapture(0)
_, first = cap.read()
while True:
_, second = cap.read()
orig = second.copy()
import numpy as np
import random
X = []
logx=[]
logy=[]
for i in range(10000):
X.append([random.randint(1,1000), random.randint(1,1000)])
logx.append([np.log(X[i][0]), np.log(X[i][1])])
### video tutorial https://youtu.be/yt20FGrZmbM
from PIL import ImageGrab
import cv2
import numpy as np
from pynput.keyboard import Controller
flaga = True
flagb = True
flagc = True
@Pawandeep-prog
Pawandeep-prog / calculating_distance
Last active January 30, 2024 21:47
Calculate the distance between the motion object and the fixed point
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
_, prev = cap.read()
prev = cv2.flip(prev, 1)
_, new = cap.read()
new = cv2.flip(new, 1)
import random
import numpy as np
X =[]
y =[]
for i in range(1000):
X.append([random.randint(1, 1000), random.randint(1, 1000)])
y.append(sum(X[i]))
X = np.array(X)
@Pawandeep-prog
Pawandeep-prog / digit_recog.py
Created May 10, 2020 02:47
MNIST digit recog. using opencv and keras
import tensorflow as tf
import cv2
import numpy as np
import matplotlib.pyplot as plt
from tensorflow.keras.models import load_model
dataset = tf.keras.datasets.mnist
#### train - test - split ####
(X_train, y_train), (X_test, y_test) = dataset.load_data()