Git Product home page Git Product logo

diamondify's Introduction

๐Ÿ’Ž Diamondify: Make Your Code Shine! โœจ

Ever wrote code so trash it burnt your eyes? ๐Ÿ”ฅ๐Ÿ‘€ Fear not! Diamondify is here to rescue your retinas and make your code efficient and well-commented!

๐Ÿš€ Quick Start

Before you embark on your Diamondifying Journey, you'll need to set up your secret weapon: the OpenAI API key!

๐Ÿ”‘ Setting Up Your API Key

Choose your operating system and follow the instructions:

๐Ÿ’ป Windows
  1. Open the Start menu and search for "Environment Variables"
  2. Click on "Edit the system environment variables"
  3. Click the "Environment Variables" button
  4. Under "System variables", click "New"
  5. Set the variable name as OPENAI_API_KEY
  6. Set the variable value as your OpenAI API key
  7. Click "OK" to save

Alternatively, you can use the command prompt:

setx OPENAI_API_KEY "your-api-key-here"

Remember to restart your command prompt after setting the variable!

๐ŸŽ macOS and Linux
  1. Open Terminal
  2. Edit your shell configuration file (e.g., ~/.bash_profile, ~/.zshrc)
  3. Add the following line:
    export OPENAI_API_KEY="your-api-key-here"```
  4. Save the file and run:
    source ~/.bash_profile

or ( if you are using Zsh)

source ~/.zshrc

๐ŸŒŸ Usage

Now that you're all set up, let's make some code efficient!

python diamondify.py [-h] (-f FILE | -d DIRECTORY) [-o OUTPUT] -m MODEL

๐ŸŽ›๏ธ Options:

  • -h, --help: Show the help message and exit
  • -f FILE, --file FILE: Input file to process
  • -d DIRECTORY, --directory DIRECTORY: Input directory to process
  • -o OUTPUT, --output OUTPUT: Output directory (default: ./output)
  • -m MODEL, --model MODEL: Model to use for processing (default: gpt-4o)

๐Ÿ’ก Examples:

Clean, and improve the code of a single file ( btw supports any programming language):

python main.py -f ugly_code.py -m gpt-4o

Improve the code of a whole directory:

python main.py -d messy_project -o shiny_project -m gpt-4o

Note - By default all the code will be saved in a new directory called as output inside the working directory of the terminal

๐Ÿš€ Watch the Magic Happen!

Sit back and witness Diamondify transform your code from cluttered to clean and efficient! ๐Ÿงนโœจ

Diamondify doesn't just make your code prettier - it enhances its efficiency and readability by:

  • Optimizing algorithms and data structures ๐Ÿง 
  • Adding clear, concise comments to functions and code blocks ๐Ÿ“
  • Improving variable naming for better comprehension ๐Ÿท๏ธ
  • Refactoring complex logic into more manageable chunks ๐Ÿงฉ
  • Suggesting best practices and design patterns where applicable ๐ŸŒŸ

Remember, with great power comes great responsibility. Use Diamondify to learn and improve your coding skills, not just as a quick fix! ๐ŸŽ“

๐Ÿค” Questions? Issues?

If you encounter any problems or have questions about the improvements Diamondify suggests, feel free to open an issue. We're here to help you understand and elevate your code! ๐Ÿ“ˆ

Now go forth and enhance your code with Diamondify! ๐Ÿ’Ž๐Ÿš€

diamondify's People

Contributors

itachi-uchiha581 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.