Giter VIP home page Giter VIP logo

tagcloud's Introduction

Tagcloud backend

Short description

     Implemented the backend for a sample tagcloud service using twitter sample stream.

Tools and languages
  • implemented in Python, using Flask framework
  • used Redis for incrementing the word counts
  • used a Docker container for running Redis
  • used a Docker container for running the Python application
  • used Docker Compose for putting together the Python application's Docker with the Redis one
Environment installation and set-up
Build and run

1. Open a terminal console
2. Go into application's folder
3. Run the following command

docker-compose up

Now, Compose will pull a Redis image, build an image for the Python application's code, and start everything up. The web app should now be listening on port 5000 on your Docker daemon host.

4. You can run the application either from another terminal 4.1 or from an web browser 4.2
4.1 Open another terminal and give one of the following commands:

  • use this command to run the program with default values 5 seconds and 5 words included in tagcloud
curl 0.0.0.0:5000

* use this command to run the program with the given number of seconds as parameter and a default value of 5 words included in tagcloud ``` curl 0.0.0.0:5000/post/the_duration_of_the_data_fetch ```
* use this command to run the program with the given number of seconds as parameter and given number of words included in tagcloud ``` curl 0.0.0.0:5000/post/the_duration_of_the_data_fetch/how_many_words_it_should_include_in_the_tagcloud ```
******************************************************************************************************************* **After running the application with one of the above commands you will receive in current terminal the sample stream statistics.
Also, in the first terminal (the terminal where you run the docker-compose) you can track the stream evolution, step by step.** *******************************************************************************************************************
**4.2** *Open an web brouser insert one of the following links:*
* use this link to get the program running results with default values 5 seconds and 5 words included in tagcloud ``` http://0.0.0.0:5000 ``` * use this link to get the program running results with the given number of seconds as parameter and a default value of 5 words included in tagcloud ``` http://0.0.0.0:5000/post/the_duration_of_the_data_fetch ``` * use this link to get the program running results with the given number of seconds as parameter and given number of words included in tagcloud ``` http://0.0.0.0:5000/post/the_duration_of_the_data_fetch/how_many_words_it_should_include_in_the_tagcloud ```
******************************************************************************************************************* **After running the application with one of the above links you will receive in your web browser the sample stream statistics.
Also, in the first terminal (the terminal where you run the docker-compose) you can track the stream evolution, step by step.** *******************************************************************************************************************

##### Useful references: --- * [Python Documentation](https://www.python.org/doc/) * [Docker Documentation](http://docs.docker.com/) * [Redis Documentation](http://redis.io/documentation) * [Redis-py Documentation](https://redis-py.readthedocs.org/en/latest/) * [Tweepy Documentation](http://docs.tweepy.org/en/latest/api.html)

tagcloud's People

Contributors

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