gemini-pro-code-translator
Ever wondered about translating code from one programming language to another quickly? Gemini Pro Code Translator is the tool to do so.
Source Code
The source code of the application Gemini Pro Code Translator is available in
Installation
pip install gemini-pro-code-translator
How to Use the Application?
Pre-requisites:
- Python installed in your device.
- .env file in the same directory as <GEMINI_PRO_CODE_TRANSLATOR_DIRECTORY> and has the value of GEMINI_API_KEY.
First, open a Terminal or Command Prompt window and run the following command.
cd <GEMINI_PRO_CODE_TRANSLATOR_DIRECTORY>
python3 main.py
Note: Replace <GEMINI_PRO_CODE_TRANSLATOR_DIRECTORY> with the path to the directory of the application Gemini Pro Code Translator.
Then, the application will start with something looking like in the screenshot below.
You will then be asked to input the following values.
- Temperature - between 0 and 1 inclusive
- Top P - between 0 and 1 inclusive
- Top K - at least 1
- Max output tokens - at least 1
The following screenshot shows what is displayed after inputting the mentioned values.
You will be required to input the following pieces of information.
- The name of the programming language you want to translate code from.
- The path of the file containing the code to be translated.
- The name of the programming language you want to translate code to (must be different from the one in step 1).
- The name of the file you want the translated code to be placed in (without the extension).
Once you enter the values mentioned above, the file containing the code will be created inside "codes" directory. Then, you will be asked whether you still want to continue unit testing or not. If you enter 'Y', you will be redirected to an application window like in screenshot above. Else, you will exit the application.
Below demonstrates how the file containing the translated code looks like.
Metadata
Release files for gemini-pro-code-translator 1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gemini-pro-code-translator-1.tar.gz | 3.0 kB | Without provenance | Details for gemini-pro-code-translator-1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gemini_pro_code_translator-1-py3-none-any.whl | Python 3 | none | any | Details for gemini_pro_code_translator-1-py3-none-any.whl |
Total release size: 6.4 kB
Release files / gemini-pro-code-translator-1.tar.gz
| Download URL | gemini-pro-code-translator-1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89605b14b05f828277667e8e422c07e9487dc28c9058262a12e8aa9ea816a757
|
|
BLAKE2b-256 checksum How to use checksums |
be00d0e385e5f3bbc3652ebcff757693e46fe064f37373802d877ba7bad90452
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
|
Release files / gemini_pro_code_translator-1-py3-none-any.whl
| Download URL | gemini_pro_code_translator-1-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f489ed94b0a481334276c882f887be463f0296c92729462adcc753f5a393657b
|
|
BLAKE2b-256 checksum How to use checksums |
a69aa28cbc87d1f8cb60211967905ba28320e1f47a32bb5e5a8bdb6987af4732
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
|
Security for gemini-pro-code-translator 1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.