Coder Social home page Coder Social logo

ioccupancyserver's Introduction

1)download virtualenv: sudo apt-get install python-virtualenv
  -run virtualenv inside the projec folder: virtualenv venv
  -activate virtualenv: . venv/bin/activate
  -download other usefull library: libmysqlclient-dev  python-dev  gfortran  libblas-dev liblapack-dev
  -if you are using a raspberry in order to install the follow requirements you have to give to compiler all ram, otherwise you cannot compile them. To do this open a terminal and with root privileges launch "raspi-config". On the screen select "Advance options" โ†’ "Memory split" โ†’ set "16" as memory for the gpu. After compiling you can restore the previous value.
  -install python packages: pip install -r requirements.txt

2) create   database:
  - launch mysqld if not active
  -start  virtualenv with this command: . venv/bin/activate
  -create a mysql user  and  a  database
  -check the fields  user password host  database in iBeaconOccupancy/model/config.py
  -create database  through script: ./create_database.sh
3)launch the server with sudo because runs over port 80:sudo ./start_server.sh

NB
All scripts must be modified with "chmod +x". If you want to change the port listening by the server just change the port number variable in tornado_laucher.py

Library notes
SQLAlchemy =>  libmysqlclient-dev e  python-dev
scipy            =>  gfortran  libblas-dev liblapack-dev if any problem http://scikit-learn.org/stable/install.html
matplotlib    =>  libfreetype6-dev libjpeg8-dev libpng-dev


Library needed may vary depending on the type and the version of the operationg system so don't completely rely on them probably in yourr system are required slightly different library

Folder stucture
app.py: app which start the default python server
tornado_launcher.py: wrapper of app.py which allowes to run the server through Tornado
iBeaconOccupancy: package which contains all the logic of the server
test_machine_learning: contains a script used to test parameters and quality of the model found
templates:simple html pages to show some information

ioccupancyserver's People

Contributors

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