Password GuessLast Updated on May 3, 2021
# importing random
from random import *
# taking input from user
user_pass = input("Enter your password")
# storing alphabet letter to use thm to crack password
password = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j','k',
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't','u','v',
'w', 'x', 'y', 'z',]
# initializing an empty string
guess = ""
# using while loop to generate many passwords untill one of
# them does not matches user_pass
while (guess != user_pass):
guess = ""
# generating random passwords using for loop
for letter in range(len(user_pass)):
guess_letter = password[randint(0, 25)]
guess = str(guess_letter) + str(guess)
# printing guessed passwords
# printing the matched password
print("Your password is",guess)
Share with someone who needs it
Tic-Tac-Toe GameLast Updated on May 3, 2021
This project Tic Tac Toe game against a simple artificial intelligence. An artificial intelligence (or AI) is a computer program that can intelligently respond to the player’s moves. This game doesn’t introduce any complicated new concepts. The artificial intelligence that plays Tic Tac Toe is really just a few lines of code.
Two people play Tic Tac Toe with paper and pencil. One player is X and the other player is O. Players take turns placing their X or O. If a player gets three of their marks on the board in a row, column or one of the two diagonals, they win. When the board fills up with neither player winning, the game ends in a draw.
This chapter doesn’t introduce many new programming concepts. It makes use of our existing programming knowledge to make an intelligent Tic Tac Toe player. The player makes their move by entering the number of the space they want to go. These numbers are in the same places as the number keys on your keyboard's keypad
First, you must figure out how to represent the board as data in a variable. On paper, the Tic Tac Toe board is drawn as a pair of horizontal lines and a pair of vertical lines, with either an X, O, or empty space in each of the nine spaces.
In the program, the Tic Tac Toe board is represented as a list of strings. Each string will represent one of the nine spaces on the board. To make it easier to remember which index in the list is for which space, they will mirror the numbers on a keyboard’s number keypad.
The strings will either be 'X' for the X player, 'O' for the O player, or a single space ' ' for a blank space.
So if a list with ten strings was stored in a variable named board, then board would be the top-left space on the board. board would be the center. board would be the left side space, and so on. The program will ignore the string at index 0 in the list. The player will enter a number from 1 to 9 to tell the game which space they want to move on.
Creating a program that can play a game comes down to carefully considering all the possible situations the AI can be in and how it should respond in each of those situations. The Tic Tac Toe AI is simple because there are not many possible moves in Tic Tac Toe compared to a game like chess or checkers.
Our AI checks if any possible move can allow itself to win. Otherwise, it checks if it must block the player’s move. Then the AI simply chooses any available corner space, then the center space, then the side spaces. This is a simple algorithm for the computer to follow.
The key to implementing our AI is by making copies of the board data and simulating moves on the copy. That way, the AI code can see if a move results in a win or loss. Then the AI can make that move on the real board. This type of simulation is effective at predicting what is a good move or not.
Human Computer Interaction Using Iris,Head And Eye DetectionLast Updated on May 3, 2021
HCI focus on interfaces between people and computers and how to design, evaluate, and implement interactive computer systems that satisfy the user. The human–computer interface can be described as the point of communication between the human user and the computer. The flow of information between the human and computer is defined as the loop of interaction. It deals with the design, execution and assessment of computer systems and related phenomenon that are for human use. HCI process is completed by applying a digital signal processing system which takes the analog input from the user by using dedicated hardware (Web Camera) with software.
Eye tracking is the process of measuring either the point of gaze(where one is looking)or the motion of the eye relative to the head. An eye tracker is a device for measuring eye positions and eye movement. Eye trackers are used in research on the visual system, in psychology, in marketing, as an input device for human computer interaction, and in product design. There are a number of methods for measuring the eye movement. The most popular variant uses video images from which the eye positions are extracted. Eye movement are made using direct observations. It is observed that reading does not involve a smooth sweeping of the eyes along the text, as previously assumed, but a series of short stops(called fixations).All the records show conclusively that the character of the eye movement is either completely independent of or only very slightly dependent on the material of the picture and how it is made. The cyclical pattern in the examination of the picture is dependent not only on what is shown on the picture, but also on the problem facing the observer and the information that ones hopes to get from the picture. Eye movement reflects the human thought process; so the observers thought may be followed to some extent from records of eye movement. It is easy to determine from these records from which the elements attract the observers eye in what order, and how often.
We build a neural network here and there are two types of network:Feed-forward networkFeed back network
Using video-oculography, horizontal and vertical eye movements tend to be easy to characterize, because they can be directly deduced from the position of the pupil. Torsional movements, which are rotational movements about the line of sight, are rather more difficult to measure; they cannot be directly deduced from the pupil, since the pupil is normally almost round and thus rotationally invariant. One effective way to measure torsion is to add artificial markers (physical markers, corneal tattoos, scleral markings, etc.) to the eye and then track these markers. However, the invasive nature of this approach tends to rule it out for many applications. Non-invasive methods instead attempt to measure the rotation of the iris by tracking the movement of visible iris structures.
To measure a torsional movement of the iris, the image of the iris is typically transformed into polar co-ordinates about the center of the pupil; in this co-ordinate system, a rotation of the iris is visible as a simple translation of the polar image along the angle axis. Then, this translation is measured in one of three ways: visually, by using cross-correlation or template matching, or by tracking the movement of iris features. Methods based on visual inspection provide reliable estimates of the amount of torsion, but they are labour intensive and slow, especially when high accuracy is required. It can also be difficult to do visual matching when one of the pictures has an image of an eye in an eccentric gaze position.
If instead one uses a method based on cross-correlation or template matching, then the method will have difficulty coping with imperfect pupil tracking, eccentric gaze positions, changes in pupil size, and non-uniform lighting. There have been some attempts to deal with these difficulties but even after the corrections have been applied, there is no guarantee that accurate tracking can be maintained. Indeed, each of the corrections can bias the results.
The remaining approach, tracking features in the iris image, can also be problematic. Features can be marked manually, but this process is time intensive, operator dependent, and can be difficult when the image contrast is low. Alternatively, one can use small local features like edges and corners. However, such features can disappear or shift when the lighting and shadowing on the iris changes, for example, during an eye movement or a change in ambient lighting. This means that it is necessary to compensate for the lighting in the image before calculating the amount of movement of each local feature.
In our application of the Maximally Stable Volumes detector, we choose the third dimension to be time, not space, which means that we can identify two-dimensional features that persist in time. The resulting features are maximally stable in space (2-D) and time (1-D), which means that they are 3-D intensity troughs with steep edges. However, the method of Maximally Stable Volumes is rather memory intensive, meaning that it can only be used for a small number of frames (in our case, 130 frames) at a time. Thus, we divide up the original movie into shorter overlapping movie segments for the purpose of finding features. We use an overlap of four frames, since the features become unreliable at the ends of each sub-movie. We set the parameters of the Maximally Stable Volumes detector such that we find almost all possible features. Of these features, we only use those that are near to the detected pupil center (up to 6 mm away) and small (smaller than roughly 1% of the iris region). We remove features that are large in angular extent (the pupil and the edges of the eyelids), as well as features that are further from the pupil than the edges of the eyelids (eyelashes).
We have used to track the eye movement and convert to mouse direction using eucledian distance which would greatly help the disabled people.I have also implemented a virtual keyboard.
Human Computer Interaction Using Iris,Head And Eye DetectionLast Updated on May 3, 2021
HCI stands for the human computer interaction which means the interaction between the humans and the computer.
We need to improve it because then only it would improve the user interaction and usability. A richer design would encourage users and a poor design would keep the users at bay.
We also need to design for different categories of people having different age,color,gender etc. We need to make them accessible to older people.
It is our moral responsibility to make it accessible to disabled people.
So this project tracks our head ,eye and iris to detect the eye movement by using the viola Jones algorithm.But this algorithm does not work with our masks on as it calculated the facial features to calculate the distance.
It uses the eucledian distance to calculate the distance between the previous frame and the next frame and actually plots a graph.
It also uses the formula theta equals tan inverse of b/a to calculate the deviation.
Here we are using ANN algorithm because ANN can work with incomplete data. Here we are using constructive or generative neural networks which means it starts capturing our individual images at the beginning to create our individual patterns and track the eye.
Here we actually build the neural network and train it to predict
Finally we convert it to mouse direction and clicks and double clicks on icons and the virtual keyboard.
As a contributing or moral individuals it is our duty to make devices compatible with all age groups and differently abled persons.
Long Term ToolLast Updated on May 3, 2021
My previous project was shear project project that is Long term tool .This tool is used by wind farm owners who want to know in which location it is going to give best profits.
Suppose A wants to start a wind farm business A is having money but he is not aware of wind speeds at particular location ,so he took help from B (The wind pioneers) wind pioneers uses sensor for every wind station to find the wind speed and wind direction. Here wind pioneers role is to record the data which contain wind speeds and wind directions for every hour.
wind pioneers measuring wind speeds at various heights of sensor like ws_120m,ws_100m. For each minute we have some observations ,for every hour the number of observations will increases ,so it is very large data to deal. so we cannot do manual calculations for analyzing this big data. So here we come up with one tool that is long term tool.
I worked on this project along with team this tool provide you interactive software for performing all the analysis like plots, correlation values, scatter plots for finding relationship between two variables. You can just simply download the files that you are working for. It will going to give you everything in detail.
Here we are taking Reference data as NASA data of past 30 years which contains wind speed and wind direction In order to predict the wind speeds of particular location for next 30 years by making use of linear regression model .
Here we are predicting wind speeds of next 30 years for particular location by taking reference data as NASA data.
We are performing linear model for various time periods 1hr,6hr,1 day,3day,7day,10 day,1 month. Again sometimes your weather file and climate file may be differ with time In order to compensate time period we are using time shifting for reference file.
Car Price PredictionLast Updated on May 3, 2021
It is a complete end to end project from starting stage of Data preprocessing till the last stage i.e. Model Deployment. In this project first I have done data wrangling which includes data cleaning phase in order to make our dataset more organized. Some of the common steps which I have included in my data cleaning phase are removing of outliers , handling missing values . After that I split my dataset into training and testing dataset with the help of train_test_split function . After that I have passed my training dataset to train my model , In this case I have used Random Forest Regressor as my model and GridSearchCV for the hyperparameter tuning. GridSearchCV helps us to find out the best parameters for our model which ultimately increases the accuracy of our model. After performing all these operations I have tested my model on my testing dataset and Fortunately my model is producing amazing result . I have calculated my accuracy score with the help of a function named accuracy_score. We can also use confusion matrix, classification report to see our model's performance. Accuracy of my model is 98.5%. Now at the end I deployed my model with the help of my basic web development knowledge. It includes some of the files like pickle file, app.py, requirements.txt. Now If I talk about working of my model It is used to predict selling price of a car by taking some of the features like cost price, km driven, type of fuel etc.