This guide provides instructions for running all projects in the LP-3 directory.
LP-3/
βββ BT/ # Blockchain Technology (Solidity Smart Contracts)
βββ DAA Python/ # Design and Analysis of Algorithms (Python)
βββ ML/ # Machine Learning (Jupyter Notebooks)
βββ Dataset/ # Datasets for ML projects
- Install Remix IDE (Online): https://remix.ethereum.org/
- Or install Ganache + Truffle for local development
- Open https://remix.ethereum.org/ in your browser
- Create a new file in Remix with
.solextension - Copy the code from any of the following files:
3_Bank_account.sol- Bank account smart contract3.1_Product_Inventory.sol- Product inventory management4_Student.sol- Student record management4.1_Employee.sol- Employee record management
- Paste the code into Remix
- Select appropriate Solidity compiler version (check pragma statement in file)
- Click "Compile" button
- Go to "Deploy & Run Transactions" tab
- Select "JavaScript VM" environment
- Click "Deploy"
- Interact with deployed contract functions
npm install -g truffle
npm install -g ganache-cli
REM Start Ganache
ganache-cli
REM In new terminal, compile contracts
truffle compile
REM Deploy contracts
truffle migrate
REM Interact with contracts
truffle console- Python 3.8 or higher
- Install required packages:
pip install numpy matplotlibpython "DAA Python/1_fibonacci_numbers.py"Description: Implements recursive and iterative Fibonacci calculation with time complexity analysis.
python "DAA Python/2_huffman_encoding.py"Description: Implements Huffman encoding algorithm for data compression.
python "DAA Python/3_fractional_knapsack.py"Description: Solves fractional knapsack problem using greedy approach.
python "DAA Python/4_0_1_knapsack.py"Description: Solves 0-1 knapsack problem using dynamic programming.
python "DAA Python/5_n_queens.py"Description: Solves N-Queens problem using backtracking algorithm.
python "DAA Python/6_QuickSort.py"Description: Implements Quick Sort with deterministic and randomized pivot selection.
- Python 3.8 or higher
- Jupyter Notebook or JupyterLab
- Install required packages:
pip install -r requirements.txtOr install individually:
pip install pandas numpy matplotlib seaborn scikit-learn tensorflow keras jupyter opendatasetscd LP-3\ML
jupyter notebookcd LP-3\ML
jupyter labjupyter notebook "1. Uber Price Detection.ipynb"Description: Predicts uber ride prices using linear regression.
Dataset: Dataset/1-uber.csv
jupyter notebook "2. Email Spam Classification.ipynb"Description: Classifies emails as spam or ham using machine learning.
Dataset: Dataset/2-email.csv
jupyter notebook "3. Neural_Network.ipynb"Description: Implements artificial neural network for classification.
Dataset: Dataset/3-Churn_Modelling.csv
jupyter notebook "4. GradientDescent.ipynb"Description: Demonstrates gradient descent optimization algorithm.
Dataset: Built-in dataset
jupyter notebook "5. KNN_on_Diabetes.ipynb"Description: Applies K-Nearest Neighbors algorithm on diabetes dataset.
Dataset: Dataset/4-diabetes.csv
jupyter notebook "6. KMeans_on_sales.ipynb"Description: Performs customer segmentation using K-Means clustering.
Dataset: Dataset/5-sales_data_sample.csv
- Install Python extension in VS Code
- Install Jupyter extension in VS Code
- Open VS Code
- Open the LP-3 folder
- Navigate to
ML/directory - Click on any
.ipynbfile - Select Python kernel (top-right corner)
- Run cells using Shift+Enter or click "Run All"
- Module not found: Run
pip install <module_name> - Python not recognized: Add Python to system PATH
- Jupyter not starting: Try
python -m jupyter notebook
- Compiler error: Check pragma version and use matching compiler
- Deployment fails: Ensure sufficient gas limit
- Function not visible: Check function visibility (public/private)
- File not found: Ensure you're running from correct directory
- Dataset missing: Check
Dataset/folder for required CSV files - Encoding error: Try adding
encoding='unicode_escape'orencoding='utf-8'
- All Python files can be run directly from command line
- Jupyter notebooks should be run in browser or VS Code for interactive experience
- Solidity contracts require Ethereum development environment
- Datasets are included in
Dataset/folder for ML projects - Some notebooks may download datasets from Kaggle (requires
opendatasetspackage)
REM Install all Python dependencies
pip install -r requirements.txt
REM Start Jupyter for ML projects
cd LP-3\ML
jupyter notebook
REM Run any DAA Python file
cd LP-3
python "DAA Python/1_fibonacci_numbers.py"
REM Open Remix IDE for BT projects
start https://remix.ethereum.org/- Remix IDE Documentation: https://remix-ide.readthedocs.io/
- Solidity Documentation: https://docs.soliditylang.org/
- Python Documentation: https://docs.python.org/3/
- Scikit-learn Documentation: https://scikit-learn.org/
- TensorFlow Documentation: https://www.tensorflow.org/
#sahil chatgpt theory - https://chatgpt.com/share/691550ba-fba8-8011-9041-964b801fec4c #omkar chatgpt theory - https://chatgpt.com/share/691344b0-9eb8-8003-ab2e-73b68fd322b2 Created for SPPU CSE Semester 7 - Laboratory Practice 3