This file contains hidden or 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 time | |
| import pandas | |
| from datetime import datetime | |
| static_back = None # static back to color | |
| motion_list = [None, None] | |
| time_list = [] | |
| df = df = pandas.DataFrame(columns = ['Start Motion', 'End Motion']) # this dataframe will turn into a csv file later |
This file contains hidden or 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 os | |
| # Load and create faceCascade Classifier | |
| eyePath = os.path.dirname(cv2.__file__)+"/data/haarcascade_eye.xml" | |
| eyeCascade = cv2.CascadeClassifier(eyePath) | |
| # Create 'video' and 'out' objects ('out' is the video that will be saved) | |
| video = cv2.VideoCapture(0) | |
| out = cv2.VideoWriter('eyeDetection.mp4', -1, 20.0, (640,480)) |
This file contains hidden or 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 os | |
| # Load and create faceCascade Classifier | |
| facePath = os.path.dirname(cv2.__file__)+"/data/haarcascade_frontalface_default.xml" | |
| faceCascade = cv2.CascadeClassifier(facePath) | |
| # Create 'video' and 'out' objects ('out' is the video that will be saved) | |
| video = cv2.VideoCapture(0) | |
| out = cv2.VideoWriter('faceDetection.mp4', -1, 20.0, (640,480)) |
This file contains hidden or 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
| If you would like to use notepad in your browser, follow these steps | |
| 1 - open a new tab; | |
| 2 - tip this command over the URL input: | |
| data:text/html, <html contenteditable> | |
| 3 - Press 'enter' and use the notepad!!! | |
| 4 - Press CTRL + S to save the file and open whenever nedda use it in the browser |
This file contains hidden or 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
| // Java program to check if an email address | |
| // is valid using Regex. | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| class Test | |
| { | |
| public static boolean isValid(String email) | |
| { | |
| String emailRegex = "^[a-zA-Z0-9_+&*-]+(?:\\."+ |
This file contains hidden or 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
| /* | |
| these classes I use a lotta times programming websites with neomorphismo design, so, I gonna keep the code save here | |
| */ | |
| /** variables **/ | |
| /* light Theme */ | |
| :root { | |
| --primary-background-color: #cbced1; | |
| --secundary-background-color: #414649; | |
This file contains hidden or 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
| /* | |
| UUID is used as PRIMARY or UNIQUE KEY in our table's rows. Different of sequencial primary key, that starts from 1 and | |
| are incremented 1 by 1, UUID is a hexadecimal random value that is generated automatically by the RDBMS. | |
| How to explain the pros and cons about UUID Use is not the goal here, I gonna just put how to use and convert the value | |
| from text to byte and vice-versa. | |
| If u wanna read and learn what is and the pros\cons about UUID, check this MySQL's Post: | |
| https://mysqlserverteam.com/mysql-8-0-uuid-support/ | |
| */ |