Skip to content

Commit b40b246

Browse files
author
Lokeshwaran Boopathy
committed
Resolved merge conflict
2 parents 8f8b6dd + aee7071 commit b40b246

File tree

5 files changed

+39
-81
lines changed

5 files changed

+39
-81
lines changed

README.md

Lines changed: 20 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,27 @@
1-
# Neploy: Simplifying Neo3 Smart Contract Deployment and Testing
1+
# neploy
22

3-
![Neploy Banner](neploy_banner.png)
3+
**Improvised Code.py follow the below instructions** (https://github.com/lokeshwaran100/neploy/blob/main/src/backend/Improvised%20Code.py)
4+
5+
lets get started as how to run and deploy the above along with input
46

5-
Welcome to the official repository of **Neploy**, a groundbreaking project submitted under the Infrastructure and Tooling category for the Neo3 Blockchain Hackathon. Neploy aims to revolutionize the process of deploying, testing, and reviewing Neo smart contracts written in Python, all while eliminating the complexities of setting up the development environment with Neo blockchain toolkits.
7+
Install the necessary Python libraries. You can do this using the pip install command:
8+
pip install numpy pandas sklearn
69

7-
## Table of Contents
10+
Save the code in a file called code_optimization_model.py.
11+
Create a file called input.txt and add the code snippets that you want to analyze. Each code snippet should be on a separate line.
12+
Open a terminal and navigate to the directory where the code and input file are saved.
13+
Run the following command to train the model:
14+
python code_optimization_model.py
15+
This will print the classification report for the model.
816

9-
- [Project Overview](#project-overview)
10-
- [Features](#features)
11-
- [Technology Stack](#technology-stack)
12-
- [Getting Started](#getting-started)
13-
- [Usage](#usage)
14-
- [AI-Powered Code Review](#ai-powered-code-review)
15-
- [Contributing](#contributing)
16-
- [License](#license)
17-
- [Contact](#contact)
17+
To predict the suggested improvement for each code snippet, run the following command:
18+
python code_optimization_model.py input.txt
19+
This will print the results for each code snippet.
1820

19-
## Project Overview
21+
To deploy the model, you can use a variety of methods, such as:
2022

21-
Neploy addresses the common challenges faced by developers when it comes to working with Neo smart contracts. Compiling, deploying, and testing these contracts manually can be time-consuming and error-prone. Neploy simplifies this process by providing an intuitive web portal that interacts with a Kubernetes-based backend to streamline the entire workflow.
23+
Saving the model to a file and loading it into a production environment.
24+
Using a cloud-based machine learning service, such as Google Cloud AI Platform or Amazon SageMaker.
25+
Building a web application that uses the model to predict code improvements.
2226

23-
## Features
24-
25-
- **User-Friendly Portal:** Neploy offers a user-friendly web portal that allows developers to effortlessly deploy their Neo smart contracts without the need for intricate setup steps.
26-
27-
- **Automated Compilation:** The smart contract deployment process includes automated compilation, ensuring that the code is error-free before being sent to the blockchain.
28-
29-
- **Effortless Testing:** Developers can easily test their smart contracts within the Neploy environment, enabling rapid iteration and bug detection.
30-
31-
- **AI-Powered Code Review:** Neploy leverages AI and machine learning to provide code optimization suggestions, enhancing the quality and efficiency of the smart contracts.
32-
33-
## Technology Stack
34-
35-
- **Backend:** Kubernetes is utilized to containerize the backend, ensuring scalability and efficient resource management.
36-
37-
- **Frontend:** The frontend is developed using JavaScript, providing a seamless interface for users to interact with the backend's exposed endpoints.
38-
39-
## Getting Started
40-
41-
Follow these steps to get started with Neploy:
42-
43-
1. Clone the repository: `git clone https://github.com/lokeshwaran100/neploy.git`
44-
2. Navigate to the project directory: `cd neploy`
45-
3. Set up the Kubernetes environment for the backend.
46-
4. Launch the frontend application by opening the `http://127.0.0.1:8080` file in your preferred web browser.
47-
48-
## Usage
49-
50-
1. Access the Neploy web portal.
51-
2. Upload your Python-based Neo smart contract.
52-
3. Configure deployment parameters.
53-
4. Initiate the deployment process.
54-
5. Monitor the compilation and deployment progress.
55-
6. Interact with the deployed contract on the Neo blockchain.
56-
57-
## AI-Powered Code Review
58-
59-
Neploy incorporates advanced AI and machine learning algorithms to perform code reviews on submitted smart contracts. This feature provides optimization suggestions, enabling developers to enhance their contracts for improved performance and efficiency.
60-
61-
## Contributing
62-
63-
Contributions are welcomed and encouraged! If you'd like to contribute to Neploy, please review our [Contribution Guidelines](CONTRIBUTING.md).
64-
65-
## License
66-
67-
Neploy is released under the [MIT License](LICENSE).
68-
69-
## Contact
70-
71-
Have questions or want to know more about Neploy? Feel free to reach out to us at neploy.support@example.com or join our community on [Discord](https://discord.gg/neploy). We'd love to hear from you!
72-
73-
---
74-
75-
*Disclaimer: This project was created for the Neo3 Blockchain Hackathon and is not affiliated with the official Neo project.*
27+
The best way to deploy the model will depend on your specific needs and requirements.

doc/NEPLOY project.pptx

1.16 MB
Binary file not shown.

src/backend/neploy-build-python/ml-code-optimiser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@
5353
#for snippet in model.predict_proba(new_code_vectorized)[0]:
5454
# print(snippet)
5555
else:
56-
print("[ ok ]: {}".format(lines[i]))
56+
print("[ ok ]: {}".format(lines[i]))

src/frontend/static/styles.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ body {
3131
.side-navbar {
3232
background-color: #1e1e1e;
3333
border-right: 1px solid #ccc;
34-
width: 150px;
34+
width: 100px;
3535
padding: 20px 0;
3636
display: flex;
3737
flex-direction: column;
@@ -128,3 +128,12 @@ body.dark-mode {
128128
.sidebar-button span {
129129
margin-top: 5px;
130130
}
131+
132+
.sidebar-button span {
133+
display: none;
134+
}
135+
136+
137+
.sidebar-button:hover span {
138+
display: inline;
139+
}

src/frontend/templates/index.html

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,21 @@ <h1 class="navbar-heading">Neploy</h1>
1919
</header>
2020
<div class="main-container">
2121
<div class="side-navbar">
22-
23-
2422
<button class="sidebar-button" id="compile-button">
25-
<i class="fas fa-bug"></i> Compile
23+
<i class="fas fa-bug"></i>
24+
<span>Compile</span>
2625
</button>
27-
<button class="sidebar-button" id="test-button">
28-
26+
<!-- <button class="sidebar-button" id="test-button">
2927
<i class="fas fa-play"></i>
30-
Test
31-
</button>
32-
28+
<span>Test</span>
29+
</button> -->
3330

3431
<button class="sidebar-button" id="optimizer-button">
35-
<i class="fas fa-cog"></i>
36-
<span>Optimizer</span>
32+
<i class="fas fa-magic"></i>
33+
<span> Review Code</span>
3734
</button>
38-
3935
</div>
36+
4037
<div class="editor-and-output">
4138
<div class="editor-wrapper">
4239
<label for="editor" class="editor-label" style="color: whitesmoke;">

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy