Skip to content

Converts plain english to python code snippets by using OpenAI CODEX.

License

Notifications You must be signed in to change notification settings

alxschwrz/codex_english2python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗣 codex_english2python 🧑‍💻

OpenAI Codex Natural Language to Python Code Snippet Generator

Why?

Remembering the correct syntax of every Python package can be very annoying and time consuming. Often you need to Google for simple commands like "How to concatenate two numpy arrays?" or "How to group entries of pandas df with same birthdate?"

Well now you can just keep a terminal up and running, prompt your request in natural english and voilà ⚡️ : a code snippet written in Python.

How it works

Reads a string from the command line in natural language and creates an input prompt which is then fed to OpenAI Codex to generate the corresponding code snippet in Python.

To generate your own files you need to get access to the Codex API (https://openai.com/blog/openai-codex/).

Installation

git clone https://github.com/alxschwrz/codex_english2python.git
cd codex_english2python
pip3 install -r requirements.txt

Example

python3 english2python.py

example_of_prompt_in_terminal

... exit the program by typing 'exit()' + Enter

Please test your generated code snippet before usage. This does not intend to produce robust code, but serves as a tool for you as a programmer. [WIP]

Credits

This project is based on the OpenAI Codex project.

About

Converts plain english to python code snippets by using OpenAI CODEX.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages