React / NextJS / TypeScript / MongoDB / NodeJS Portfolio

Customer purchase prediction - LLM written on Python
source code

Customer purchase prediction - LLM written on Python

This Python code builds, trains, and evaluates a simple neural network using TensorFlow for binary classification. It starts by importing necessary libraries for data handling, preprocessing, and building neural networks. A small fictional dataset is created with features like age, salary, years of membership, and interest in a product, along with a target variable indicating if a purchase was made. The dataset is split into training and testing sets, and the features are normalized to improve neural network performance. The neural network is defined with one hidden layer of 8 neurons using a ReLU activation function and an output layer with a single neuron using a sigmoid activation function to predict whether a purchase will be made (binary classification). The model is compiled with the Adam optimizer, binary cross-entropy loss function, and accuracy as the metric. It is trained over 50 epochs with a batch size of 2. After training, the model is evaluated on the test set, and its accuracy is printed. Finally, the model predicts purchase probabilities for the test set, converts these probabilities into binary outputs (0 or 1), and compares them with the actual test values, printing the results.

How to Build and Run a Neural Network with TensorFlow - Complete Tutorial based on this project

Weather App
source code

Weather App

Description of the Weather App Project.
This project is a simple web application that fetches and displays current weather information for a specified city. It is built using Python's Flask framework for the web application and uses the OpenWeatherMap API to retrieve weather data. The application is designed to be deployed with Waitress, a production-ready WSGI server.

Madlibs Simple Game
source code

Madlibs Simple Game

Description of the Madlibs Simple Game.
This MadLibs program is a text-based game where users are prompted to enter various types of words (such as nouns, adjectives, and verbs) which are then inserted into a pre-defined story template to create a humorous and often nonsensical narrative. The program randomly selects one of several MadLibs stories each time it is run.

Guess The Number Simple Game
source code

Guess The Number Simple Game

This Python program implements two number guessing games:
This Python program offers a simple yet interactive way to play number guessing games. The user can either guess a computer-generated number or have the computer guess a number they are thinking of. It leverages Python's random number generation capabilities and standard input/output for user interaction.

Rock Paper Scissors Simple Game
source code

Rock Paper Scissors Simple Game

The Rock-Paper-Scissors game is a classic and simple game where two players choose between rock, paper, and scissors.



The game follows these rules:

  • Rock crushes scissors.
  • Scissors cuts paper.
  • Paper covers rock.

In this version of the game, you play against the computer (Python). The game provides a personalized experience by allowing you to enter your name and keeps track of the number of games played, your wins, and Python's wins.
How to Play:

  • Run the script with your name as a command-line argument: `python script.py --name YourName`
  • Enter your choice (1 for Rock, 2 for Paper, 3 for Scissors) when prompted.
  • The game will display both your choice and the computer's choice.
  • The game will announce the winner of each round and keep track of the scores.
  • After each round, you can choose to play again or quit.
  • The game ends with a thank you message when you decide to quit.


Hangman Simple Game
source code

Hangman Simple Game

This Hangman game is a Python-based word-guessing game where the player attempts to guess a hidden word one letter at a time. The game begins by selecting a valid word randomly from a list, excluding words with spaces or hyphens. The player has a total of seven lives and can guess letters until they either reveal the entire word or run out of lives. Each incorrect guess reduces the player's lives, and the current state of the word and the player's remaining lives are visually represented using a dictionary of hangman images. The game provides feedback on guessed letters, prompts for new guesses, and concludes with either a congratulatory message for guessing the word correctly or a message revealing the word if the player runs out of lives.



Tic Tac Toe Simple Game
source code

Tic Tac Toe Simple Game

The code implements a simple Tic-Tac-Toe game, allowing a human player to play against a computer player that makes random moves. The game logic is encapsulated within the TicTacToe class, and the play function orchestrates the gameplay. The HumanPlayer and RandomComputerPlayer are assumed to be defined in an external module named player.

When you run the script, the game starts and prints the board with numbers. The human player is prompted to make a move by selecting a square number. The computer then makes a random move. The game alternates between the human and computer players until there is a winner or the board is full, resulting in a tie.