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 face_recognition | |
import cv2 | |
import numpy as np | |
# เอา Code มาจาก https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py | |
video_capture = cv2.VideoCapture(0) | |
# Load a sample picture and learn how to recognize it. | |
patana_image = face_recognition.load_image_file("patana.png") #< ไฟล์ภาพหน้าตรง | |
patana_face_encoding = face_recognition.face_encodings(patana_image)[0] |
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
#include <dht.h> | |
dht DHT; | |
#define DHT11_PIN 7 | |
void setup(){ | |
Serial.begin(9600); | |
} |
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
#include "DHT.h" | |
//Constants | |
#define DHTPIN 7 // what pin we're connected to | |
#define DHTTYPE DHT22 // DHT 22 (AM2302) | |
DHT dht(DHTPIN, DHTTYPE); //// Initialize DHT sensor for normal 16mhz Arduino | |
//Variables |
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 | |
answers = [] | |
def main(): | |
_ = 'AFBF CGHB DAFG AEAB BCDC' | |
temp = {'A':'0', 'B':'0', 'C':'0', 'D':'0', 'E':'0', 'F':'0', 'G':'0', 'H':'0'} | |
pool = ['0','1','2','3','4','5','6','7','8','9'] | |
for i in temp.keys(): |
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
from tkinter import Button, Label, Tk, BOTTOM, TOP, Frame | |
from random import choice | |
root = Tk() | |
frame = Frame(root, width = 500, height = 500) | |
frame.pack(side=BOTTOM,expand = 1) | |
bottomframe = Frame(frame, width = 500) | |
bottomframe.pack() |
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 speech_recognition as sr | |
# Record Audio | |
r = sr.Recognizer() | |
m = sr.Microphone() | |
#set threhold level | |
with m as source: r.adjust_for_ambient_noise(source) | |
print("Set minimum energy threshold to {}".format(r.energy_threshold)) |