AI-Coder is a PyCharm plugin that implements code words, code sentences, and code block recommendations through deep learning, and uses C/S to obtain recommendation results.
project
├─model
│ ├─model_1
│ ├─model_2
│ └─model_3
├─dataset
│ ├─original
│ ├─preprocessed
│ └─. . . code files
├─backend
├─plugin
└─doc
Format is as follows:
model / dataset / backend / plugin / doc ( - issue ) - body
There are two points of attention in body:
- use imperative, present tense: “change” not “changed” nor “changes”
- includes motivation for the change and contrasts with previous behavior
If the current commit is for an issue, you need to specify the issue and indicate which issue or issues are closed in the body section.
If the line is not enough, you can just execute git commit
, and the text editor will pop up, allowing you to write multiple lines.
examples:
git commit -m"model - Try a new model"
git commit -m"model - Adjust model parameters to improve accuracy"
git commit -m"backend - Improve security and prevent cross-attacks"
git commit -m"plugin - issue - Close #123, #245, #992; Solve the space problem"
If the commit reverts a previous commit, its header should begin with revert:
, followed by the message and SHA of the reverted commit
example:
git commit -m"revert: add 'graphiteWidth' option SHA:667ecc1654a317a13331b17617d973392f415f02."
python 3.7.3
tensorflow 1.13.1
keras 2.2.4
Install flask
pip install flask
Go to the backend folder and run serve.py.
Enter localhost:9078/plugin_test?keyword=helloworld
in your browser and the browser returns as follows.
The backend gets the data in keyword and returns after processing. Subsequent we use the model to process the input, the reason is the same.
- The IDE used to develop the plugin: IDEA
- The version used in the test: IntelliJ IDEA 2019.1 x64
- The object to which the plugin applies: Pycharm
- The version used in the test: JetBrains PyCharm Community Edition 2019.1.1 x64
Attention: Pycharm must have a community version installed! Otherwise it cannot be debugged.
Open IDEA, File->open->the root directory of our project
Then you need to configure:
- Select the project root directory and right click in IDEA, Open module settings
- Set the SDK of the project to the Pycharm community version installed on the machine, create a new SDK, and select the pycharm community root directory for the installation.
- A Pycahrm window is launched when the project is run, with the effect of our plugin.