This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
person | |
bicycle | |
car | |
motorcycle | |
airplane | |
bus | |
train | |
truck | |
boat | |
traffic light |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
cap = cv2.VideoCapture(0) | |
_, first = cap.read() | |
while True: | |
_, second = cap.read() | |
orig = second.copy() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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])]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |