Skip to main content

Posts

Showing posts with the label ai

How to Make Gesture Controlled Snake Game in Python || Python code for snake game - Creation Code

 How to make a snake game in python? History of Snake Game: Snake is a video game genre where the player maneuvers a growing line that becomes a primary obstacle to itself. The concept originated in the 1975 two-player arcade game Blockade from Gremlin Industries, and the ease of implementation has led to hundreds of versions (some of which have the word snake or worm in the title) for many segments. After a variant was preloaded on Nokia mobile phones in 1998, there was a resurgence of interest in snake games as it found a larger audience. There are several hundred snake games for iOS alone. Modules: cv2 cvzone matplotlib scipy sklearn Roadmap: Problems Our first work will be to againcognising the hand Then find the point of the finger Now we will going to create a point with the finger We need to create a logic where the point will increase as we move the finger Next step is to stop the snake game when the coordinate of the points clash with each other Create random foods for the sna

Auto Programming With Python || How do You Automate a Programm Using Python || Fun with Python - Creation Code

  Auto Programming with Python In this post, we will create an auto program using python. In this auto program, we will send a message to your friend  Module to Be Used: pyautogui random Code: #creation code import random import pyautogui as pg import time text = ('like this video', 'subscribe') time.sleep(10) #creation code for i in range (100):     t = random.choice(text)     pg.write('Please ' + t)     pg.press('enter') Follow my socials: Youtube: https://www.youtube.com/channel/UCU1qNFntn7dCi9uqyvrGKOg Instagram:  https://www.instagram.com/python.math/ Twitter: https://twitter.com/Pritish369 For any question or coding discussion, you can join my discord or telegram: Discord: https://discord.gg/be7MmSuV Telegram: https://t.me/Python_Math_Community

Volume Control With Hand Using Python || How do you controll gestures in Python - Creation Code

Introduction: Gesture recognition helps computers to understand human body language. This helps to build a more potent link between humans and machines, rather than just the basic text user interface or graphical user interfaces(GUIs). In this project for gesture recognition, the human body's motions are read by a computer camera. The computer then makes use of this data as input to handle applications. The objective of this project is to develop an interface that will capture human hand gestures dynamically and will control the volume level Code: import cv2 import mediapipe as mp from math import hypot from ctypes import cast , POINTER from comtypes import CLSCTX_ALL from pycaw . pycaw import AudioUtilities , IAudioEndpointVolume import numpy as np cap = cv2 . VideoCapture ( 0 ) mpHands = mp . solutions .hands hands = mpHands .Hands() mpDraw = mp . solutions .drawing_utils devices = AudioUtilities . GetSpeakers () interface = devices .Activate( IAudioEnd

How to Make a Social Distancing Detector || social distancing detector using python || social distancing-detection using python github - Creation Code

Social Distancing: In public health, social distancing, also called physical distancing, is a set of non-pharmaceutical interventions or measures intended to prevent the spread of a contagious disease by maintaining a physical distance between people and reducing the number of times people come into close contact with each other. It usually involves keeping a certain distance from others(the distance specified differs from country to country and can change with time) and avoiding gathering together in large groups. Now let's build this system in python Approach: First we will create utils for the project Second we will plot the points also known as birds view Now we will create the main program utills.py import cv2 import numpy as np # Function to calculate bottom center for all bounding boxes and transform prespective for all points. def get_transformed_points ( boxes , prespective_transform ):         bottom_points = []     for box in boxes :         pnts = np . array