Skip to content

glad432/glad432.github.io

Repository files navigation

Python Minifier - Glad432

Overview

Python Minifier is a web tool that demonstrates how various technologies collaborate for code minification, execution, and sharing. This project incorporates Python, HTML, CSS, and JavaScript, along with modern frameworks and libraries.

Python Minifier - Glad432

Technologies Used

Main Technologies

  • HTML5
  • CSS3
  • JavaScript
  • Python

Frameworks and Libraries

APIs and Services

Key Benefits of Python Minification

  1. Reduced File Size: Smaller files lead to improved performance and faster load times.
  2. Bandwidth Optimization: Minified code requires less bandwidth, enhancing overall efficiency.
  3. Code Protection: Minification makes the code harder to read, providing a basic level of intellectual property protection.
  4. Improved Performance: Faster loading times lead to quicker execution of models and algorithms.
  5. Faster Load Times: Enhances user experience by ensuring applications load swiftly.
  6. Reduced Resource Consumption: Lowers CPU and GPU utilization, freeing resources for intensive tasks.
  7. Enhanced Caching: Improves caching efficiency for frequently updated data.
  8. Improved Mobile Performance: Ensures smooth operation on resource-constrained mobile devices.
  9. Streamlined Deployment: Simplifies deployment of applications with continuous learning.
  10. Faster Compilation Times: Accelerates development cycles for quick experimentation.
  11. Better Integration with Microservices: Facilitates smoother integration in microservices architectures.
  12. Optimized Data Pipeline Performance: Enhances speed in data processing pipelines.
  13. Enhanced Scalability: Allows applications to scale better under high loads.
  14. Reduced Latency in Distributed Systems: Decreases response time in distributed AI systems.
  15. Improved Energy Efficiency: Lowers energy consumption in data centers handling AI workloads.

How to Set Up and Use

To set up and run Python Minifier:

What You Need

  • Node.js (version 18.0 or newer)
  • npm (usually comes with Node.js)
  • Git (version control system)
  • Python (version 3.11 or newer)
  • Pip Python package installer

Installation

  1. Clone the repository:
git clone https://github.com/glad432/glad432.github.io.git
cd glad432.github.io
  1. Install dependencies:
npm install
  1. Remember to update the base URL in the vite.config.js and the API URLs in script.js from the next step.

Replace URLs

The replace-urls command updates specific URLs in your project files for local development. It uses the replace-in-file utility to make the following replacements:

  1. In ./js/script.js:

    • Replace https://python-compile.vercel.app with http://127.0.0.1:5000
    • Replace https://python-minify.vercel.app with http://127.0.0.1:5001
  2. In ./vite.config.js:

    • Replace https://glad432.github.io/ with /

Run the command with:

npm run replace-urls

Pip Install

The pip-install command installs required Python packages from two requirements.txt files:

npm run pip-install

For Development

To start working on the project:

npm run start-dev

This starts the development server. Open your web browser and go to http://localhost:5173 (or the address shown in your terminal) to see the app.

Building for Release

To make the project ready for release:

npm run build

This creates optimized files in the dist folder.

Looking at the Release Version

To see how the release version looks:

npm run start-preview

License

You can use this under the MIT License. See LICENSE for more details.

Thanks for checking out Python Minifier - Glad432. We'd love to hear what you think and welcome any help to make it better!