Skip to main content

Posts

Easy Tic-Tc-Toe Game with Command-line UI in Python

Today we will create a very simple Tic-Tac-Toe game, which can be played between two players. The program has a basic input-output command-line process, and displays the game layout after each turn. You need a very simple understanding of Python to get this game off the ground. This game will use a row-column system similar to Chess, which will require the player to input a specific command so that the program marks that particular tile. Don't forget to collect this python file at the end of this post to try it out instantly. So without any further ado, let's start! The Code Starting off, we initialize 3 lists, row1, row2, row3, that represent the 3 rows of the Tic-Tac-Toe game, and each value represents a tile of the game. Initially, the value is kept blank. As the players mark each tile, the values in the lists are updated with values either 'X' or 'O'. Instructions are provided at the start of the game, which clearly states how a player is supposed to input
Recent posts

Predicting Stock Prices using Machine Learning (XGBoost)

  Today, I'll show you how to create a machine learning program to predict stock prices. Machine learning is used in a variety of fields, and we can utilize its ability to learn and predict from data to predict useful variables, with minimal error. Therefore in theory, we can apply the same on stocks to predict the next closing price, so that we can make a killing gain. However, stock markets are highly unstable. Their price movement often depends on decisions taken by the company, favor and reaction of investors, social impact, human emotions, and price movements of some other related stocks. These types of data cannot be made available to a program. The prediction can be close only if the market remains relatively stable. You don't actually need to learn machine learning using python to understand how this program works, if not minimal. I'll describe each machine learning process. And don't forget to download the source code of this program, link provided at the end.

Python Keylogger: Spy Program Made Easy!

Ever wanted to spy on your friend's laptop/computer? Want to get hold of that Netflix password? You are in luck buddy! We present to you, the mighty Keylogger program   using Python .  You may be wondering: What is a Keylogger? And how can I use it to spy on my friends? Here's all you need to know: The Keylogger is a program that runs in the background without interrupting your work, and monitors your keyboard, recording each key stroke (that is, every time you press a key) in a logfile. By accessing this Logfile, you would hit the Jackpot . With this program running on someone's laptop/computer, you can get hold of usernames and passwords that they enter, with the user unaware that the information is being recorded. Beware! Data Theft is a serious offence. We will not take responsibility for any mishap that can be caused by this program. This program is shared solely for the purpose of entertainment. So what are we waiting for? Let's jump right in! And don't forge

Simple Omegle Bot Using Selenium With Python

Omegle is an online text-based and video-based chatting platform, which allows users from around the world to talk to complete strangers anonymously, for free! The text-based Omegle has a simple concept: Complete a Captcha  verification, connect automatically to a stranger, and after chatting get on to the next stranger. Apart from having a chit-chat with a stranger from the far side of the globe, Omegle poses as the perfect platform for other uses as well. At Omegle, you  can advertise your content, website, products and more for free. With access to about 40,000 strangers using Omegle at any given time, you can benefit if your ideas/advertisement is seen by potential customers. But of course, we can't advertise to each guy we meet again and again. I mean, come on, that's a lot of hard work, even if your message consists of a few words. But worry not, since that's where our Omegle Bot  comes in play. This bot works on a pre-determined set of messages that are to be conveye

Basic Stocks Graph Plotter In Python

  Plotting Graphs in Python Python offers a wide range of graphs that can be plotted using the library  Matplotlib.  We can use the function Pyplot  of Matplotlib to visualize data in many forms like Line charts, Bar charts, Histograms, Pie charts and many more. Today we will make a program to draw Line Charts for our Stock data in Python. This post is in continuation of our previous post where we explained how to collect and store daily stocks data in your database, which you can go over here:  Stock Data Collection in Python . We are going to use the stock data collected from the database we had created there, to get a peek at how a particular stock is performing. Skip to the end if you would like to get the free code! Let's get started! Modules Required As mentioned earlier, we are going to work with matplotlib , specifically with the function matplotlib.pyplot . We will also use mysql.connector to connect Python with MySQL. Last but not the least, mysql.connector.errors for er

English Dictionary With Python And Tkinter!

English Dictionary on Python Have you ever tried to read from the small Oxford Dictionaries? Those small yet bulky books have thousands of words cramped on a page the length of your finger! And on top of that, not to forget the hassle of flipping across the pages, searching for your word, God knows where is hiding on which page! Nowadays though, hardly does anyone ever use the classic dictionaries. With the access of technology on our fingertips, one tap on Google, and you would be on with your way.  But how about making a program of your own which can do the same for you? Sounds interesting? Such a program can enable you to run it and keep it opened, while you are reading a book, so that you can search the definition of a new word you encountered. What if you are writing a book, perhaps a report? You know what you are supposed to write, but you choose to get a word for it, so that you sound professional. So you just search for a short definition and the program find the word with matc

Stock Market Recorder: Stock Market Data collection using Python

  Stock Market Data Collecting Program You must have heard of stocks here and there, sometimes its on the television, some day a stock crashes, or a stock surges, it has become a star of the show when it comes to finance in recent times. Huge companies involving small investors like you and me who are willing to invest our money in their company for a tiny, tiny, tiny share in return for hopeful profits is very common nowadays. If you are one of those people who have a keen interest in stocks, then you must have certainly used one of the apps on your phone which tells you the price of the stock on that day, the company's market capital, trading value, trading quantity and what not. Apart from the financial point of view, its fun when you invest a fraction of your pocket money on these and see them up by 0.01 the next day. It makes you feel like you are destined to be the next Warren Buffet. Some people actually make a living out of it. They watch the stocks wherever it goes. But th