Coder Social home page Coder Social logo

siddhant-k-code / code-kindle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from open-sourced-olaf/code-kindle

0.0 1.0 0.0 22.78 MB

Source code to pseudocode generator using Statistical machine learning techniques for C/C++ and python3.

License: Apache License 2.0

C++ 20.60% Python 37.40% HTML 1.91% CSS 10.27% JavaScript 29.71% Modelica 0.12%

code-kindle's Introduction

Code Kindle
code

A ReactJS webapp to convert source code into pseudocode using SMT( Statistical Machine Translation)

Use Code Kindle

What is SMT? · Live . Report Bug · Request Feature

About The Project

An aid to learning which helps to visualize source code into pseudocode using SMT
You can use it live here: Code Kindle

Usage Guidelines

  • The converter page contains two editors, one for writing the source code that you want to convert and the other one which will display the pseudocode after the conversion.
  • You can also upload the file to be converted by firstly choosing the language from the dropdown menu and then browsing the file and uploading it.
  • The file that you chose will also be displayed in the text editor.
  • Now, just click on the convert button, it will run the docker container based compiler in the background.

Built With

Project Architecture

  • backend folder contains the code for the Django based API to upload the files into the projects directory.
  • code_converter folder contains the frontend code deployed on DFINITY.
  • cpp-pseudogen folder contains the translator code for cpp/c languages.
  • frontend folder contains the UI of the entire webapp.
  • python-scripts folder contains the translator for python source code.

Getting Started as Contributor

To get a local copy up and running follow these simple steps.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.

  • npm
npm install npm@latest -g

Installation

  1. Clone the repo
git clone https://github.com/Open-Sourced-Olaf/Code-Kindle.git
  1. Install NPM packages
npm install
  1. Run Locally
npm run start

Roadmap

  • Add support to more languages
  • Convert one language code into other like cpp code to php and so on.
  • Improving the algorithm of the translator to include complex cases like multiple functional calls inside the main.
  • See the open issues for a list of proposed features (and known issues).

Local Dev Setup

  • To translate the cpp/c codes,move to the cpp-pseudogen folder upload a file named "prog.cpp" and then compile the main.cpp using the command g++ main.cpp -o main after that execute ./main, it will display the output in the terminal as well as create a output.text file.
  • To translate the python code, move to the python-scripts folder, upload a file named hello.py, then compile the generatePseudo.py file using the python3 generatePseudo.py, it will produce hello-pseudo file in the working directory.
  • to run the frontend code, move to the frontend directory and run npm i followed by npm start.
  • to deploy and run the code on DFINITY, run dfx start --background to start the server in the background, then run dfx deploy, it will produce a code_converter_assets canister id, copy that.
  • then open dfx.json and find the ip address, now the url of the web app will be http://127.0.0.1:8000/?canisterId=[canister-id].
  • to deploy, run dfx ping ic, dfx deploy --network=ic.
  • the deployed url will be https://[ your canisterId here ].ic0.app/

https://gb33l-zyaaa-aaaab-aagyq-cai.ic0.app/

How to contribute.

  • Fork and clone the repository.
  • create a branch
  • make changes in that branch
  • add and commit your changes
  • then push the changes into your branch
  • now you can create a PR using that branch in our repository.
  • 🎉 you have successfully contributed to this project.

Useful links

🌟 Contributors

Admins

Important decisions regarding the project are taken by the following maintainer.

Anjali Deepak Prashi Bushra Yvon Manzi
@anjalisoni3655 @DebugAgrawal @prashi23 @codingbug671 @yvonmanzi

Deployment and Resources

code-kindle's People

Contributors

anjalisoni3655 avatar aryasoni98 avatar codingbug671 avatar debugagrawal avatar imabp avatar prashi23 avatar siddhant-k-code avatar yvonmanzi 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.