Posts

How to center an Youtube iframe horizontally?

Image
How to center an iframe horizontally? To center a YouTube <iframe> horizontally, you can use CSS.  To make you frame center you need to give your videowrapper a specific width and make the margin left and right as auto . Despite you wanna make your frame responsive always use max-width: 100% to your videowrapper .  Here's how you can do it using different approaches: 1. Using text-align on a Parent Container Wrap the <iframe> in a parent container and apply text-align: center to the container. html < div style = "text-align: center;" > < iframe width = "560" height = "315" src = "https://www.youtube.com/embed/dQw4w9WgXcQ" title = "YouTube video player" frameborder = "0" allowfullscreen > </ iframe > </ div > 2. Using Flexbox Flexbox is a modern and robust way to center elements. html < div style = "display: flex; justify-content: center;" >

Python Syntax

  Python  Syntax As we learned in the previous page, Python syntax can be executed by writing directly in the Command Line: >>> print("Hello, World!") Hello, World! Or by creating a python file on the server, using the .py file extension, and running it in the Command Line: C:\Users\ Your Name >python myfile.py Python Indentation Indentation refers to the spaces at the beginning of a code line. Where in other programming languages the indentation in code is for readability only, the indentation in Python is very important. Python uses indentation to indicate a block of code. Python has no command for declaring a variable. You will learn more about variables in the  Python Variables  chapter. Comments Python has commenting capability for the purpose of in-code documentation. Comments start with a #, and Python will render the rest of the line as a comment:

Python Getting Started

  Python  Getting Started Python Install Many PCs and Macs will have python already installed. To check if you have python installed on a Windows PC, search in the start bar for Python or run the following on the Command Line (cmd.exe): C:\Users\ Your Name >python --version To check if you have python installed on a Linux or Mac, then on linux open the command line or on Mac open the Terminal and type: python --version If you find that you do not have Python installed on your computer, then you can download it for free from the following website:  https://www.python.org/ Python Quickstart Python is an interpreted programming language, this means that as a developer you write Python (.py) files in a text editor and then put those files into the python interpreter to be executed. The way to run a python file is like this on the command line: C:\Users\ Your Name >python helloworld.py Where "helloworld.py" is the name of your python file. Let's write our first Python fi

Python Tutorial

  Python  Tutorial print ( "Hello, World!" ) What is Python? Python is a popular programming language. It was created by Guido van Rossum, and released in 1991. It is used for: web development (server-side), software development, mathematics, system scripting. What can Python do? Python can be used on a server to create web applications. Python can be used alongside software to create workflows. Python can connect to database systems. It can also read and modify files. Python can be used to handle big data and perform complex mathematics. Python can be used for rapid prototyping, or for production-ready software development. Why Python? Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc). Python has a simple syntax similar to the English language. Python has syntax that allows developers to write programs with fewer lines than some other programming languages. Python runs on an interpreter system, meaning that code can be executed as soon as it is wri

Python – Colour Detection using Pandas & OpenCV

Image
  Python – Colour Detection using Pandas & OpenCV What is Colour Detection? Colour detection is the process of detecting the name of any color. Simple isn’t it? Well, for humans this is an extremely easy task but for computers, it is not straightforward. Human eyes and brains work together to translate light into color. Light receptors that are present in our eyes transmit the signal to the brain. Our brain then recognizes the color. Since childhood, we have mapped certain lights with their color names. We will be using the somewhat same strategy to detect color names. Prerequisites Before starting with this Python project with source code, you should be familiar with the computer vision library of Python that is  OpenCV  and  Pandas . OpenCV, Pandas, and numpy are the Python packages that are necessary for this project in Python. To install them, simply run this pip command in your terminal: pip install opencv-python numpy pandas Run Python File The beginner Python project is now

Use Open cv to analyze the palm line

Image
  Use Open cv to analyze the palm line main line extraction! How to do scientific fortune telling? We will use Python and OpenCV libraries in this article to find the main lines in our palms. First, let's read the original image: import cv2 image = cv2.imread( r'G:\PARAS\palm.jpeg' ) cv2.imshow( "palm" ,image) #to view the palm in python cv2.waitKey( 0 ) #Now we will use a filtering algorithm called Canny Edge Detector # to find the palm print. For different images, we need to change the parameters accordingly. gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY) #Now we convert the image to grayscale: edges = cv2.Canny(gray, 60 , 65 , apertureSize = 3 ) cv2.imshow( "edges" ,edges) cv2.waitKey( 0 ) #Now we will reverse the color to ensure that the recognized line is black: edges = cv2.bitwise_not(edges) cv2.imshow( "change black and white" ,edges) cv2.waitKey( 0 ) #Now we mix the image above with the original image. cv2.imwrite( "palmlines.jpg&qu

Python – Face detection and sending notification

Image
  Python – Face detection and sending notification A simple method is implemented using python how to detect human face and after detecting sends notifications to the user. If face is not recognised it does not send notifications to the owner. WE WILL USE: OpenCV:  OpenCV is a huge open-source library for computer vision, machine learning, and image processing. OpenCV supports a wide variety of programming languages like Python, C++, Java, etc. It can process images and videos to identify objects, faces, or even the handwriting of a human. When it is integrated with various libraries, such as Numpy which is a highly optimized library for numerical operations, then the number of weapons increases in your Arsenal i.e whatever operations one can do in Numpy can be combined with OpenCV.This OpenCV tutorial will help you learn the Image-processing from Basics to Advance, like operations on Images, Videos using a huge set of Opencv-programs and projects. Sinch  :  Sinch  is used to send mess