Code Monkey home page Code Monkey logo

lzw-coding-webapp's Introduction

lzw-coding-webapp

Additional project for Advanced Programming course on EITI (WUT). Simple web application for coding and decoding text using LZW (Lempel-Ziv-Welch) algorithm.
Architecture is based on:

  • C++, boost.python - calculations,
  • Django (Python) - server controller,
  • AngularJS + HTML5 - client controller and interface.

Author: Adam Napieralski
View in: [Polish](README.pl.md)

Installation

Prerequisites

Packages and technologies used:

  • g++
  • scons
  • boost (Boost.Python, Boost.Test)
  • python3 / python2
  • nodejs >=v10.15
  • django >=v1.11
  • angularjs >=v1.7

On Linux (designed for and tested on Ubuntu 18.04)

To install all of needed packages, use bash script:

./install.sh

Default version of python for which some packages are installed is 3.x, however, you can change it to python2 with e.g.:

./install.sh python=2.6

You can also manually install all prerequisites following the steps:

  1. sudo apt update && sudo apt upgrade
  2. sudo apt install g++ scons nodejs npm libboost-dev libboost-all-dev
  3. (for Python3) sudo apt install python3-dev python3-pip and sudo pip3 install -r pip_requirements.txt
  4. (for Python2) sudo apt install python-dev python-pip and sudo pip install -r pip_requirements.txt
  5. cd client
  6. npm install

On Windows

  1. Install Microsoft Visual Studio.
  2. Install preferred Python (e.g. Python3.6) in the default path (C:\Python36), add it to the PATH.
  3. Install pip / pip3 - download get-pip.py then run python get-pip.py.
  4. pip install --egg scons
  5. pip install -r pip_requirements.txt
  6. Download and install boost in C:\Boost.
  7. Install nodejs.
  8. In client/ install js node modules with npm install.

Build

To build and compile application, use:

scons

The default python version is 3.7. To build with one of other supported versions [2.6, 2.7, 3.6, 3.7, 3.8], set argument:

scons python=2.6

After once defined, it will be stored and used in further scons run, so there will be no need to define it again.

Tests

To run unit tests (together with building), use:

scons --test

Run server

To run django server on predefined address (127.0.0.1:8000), use:

scons --run

or manually run: python ./build_web/manage.py runserver [ip]:[port] or python3 ./build_web/manage.py runserver [ip]:[port]

Usage

Open your browser and go to defined address, like: http://127.0.0.1:8000/. In the left text area you can type the text to code or code to decode - depending on type set with a switch. You can also define number of bits available to use in code. Run algorithm with RUN button. The reached Compression Rate will be displayed in the middle.

lzw-coding-webapp's People

Contributors

adamnapieralski avatar

Watchers

 avatar  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.