practical-recommender-systems / Moviegeek

Licence: mit
A django website used in the book Practical Recommender Systems to illustrate how recommender algorithms can be implemented.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Moviegeek

Collaborative Deep Learning For Recommender Systems
The hybrid model combining stacked denoising autoencoder with matrix factorization is applied, to predict the customer purchase behavior in the future month according to the purchase history and user information in the Santander dataset.
Stars: ✭ 60 (-90.13%)
Mutual labels:  data-science, recommender-system
Python Articles
Monthly Series - Top 10 Python Articles
Stars: ✭ 288 (-52.63%)
Mutual labels:  data-science, django
Flurs
🌊 FluRS: A Python library for streaming recommendation algorithms
Stars: ✭ 97 (-84.05%)
Mutual labels:  data-science, recommender-system
Winerama Recommender Tutorial
A wine recommender system tutorial using Python technologies such as Django, Pandas, or Scikit-learn, and others such as Bootstrap.
Stars: ✭ 324 (-46.71%)
Mutual labels:  django, recommender-system
Wooey
A Django app that creates automatic web UIs for Python scripts.
Stars: ✭ 1,680 (+176.32%)
Mutual labels:  data-science, django
Artificio
Deep Learning Computer Vision Algorithms for Real-World Use
Stars: ✭ 326 (-46.38%)
Mutual labels:  data-science, recommender-system
Vehicle counting tensorflow
🚘 "MORE THAN VEHICLE COUNTING!" This project provides prediction for speed, color and size of the vehicles with TensorFlow Object Counting API.
Stars: ✭ 582 (-4.28%)
Mutual labels:  data-science
Lbforum
LBForum is a forum engine written in Python using Django
Stars: ✭ 594 (-2.3%)
Mutual labels:  django
Django Payments
Universal payment handling for Django.
Stars: ✭ 575 (-5.43%)
Mutual labels:  django
Django Jazzmin
Jazzy theme for Django
Stars: ✭ 574 (-5.59%)
Mutual labels:  django
Django Newsletter
An email newsletter application for the Django web application framework, including an extended admin interface, web (un)subscription, dynamic e-mail templates, an archive and HTML email support.
Stars: ✭ 605 (-0.49%)
Mutual labels:  django
Smile
Statistical Machine Intelligence & Learning Engine
Stars: ✭ 5,412 (+790.13%)
Mutual labels:  data-science
Django Todo
A multi-user, multi-group todo/ticketing system for Django projects. Includes CSV import and integrated mail tracking.
Stars: ✭ 592 (-2.63%)
Mutual labels:  django
Imbalanced Learn
A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning
Stars: ✭ 5,617 (+823.85%)
Mutual labels:  data-science
Awesome Django
The Best Django Resource, Awesome Django for mature packages.
Stars: ✭ 591 (-2.8%)
Mutual labels:  django
Site
pythondiscord.com - A Django and Bulma web application.
Stars: ✭ 580 (-4.61%)
Mutual labels:  django
Django Paypal
A pluggable Django application for integrating PayPal Payments Standard or Payments Pro
Stars: ✭ 602 (-0.99%)
Mutual labels:  django
Djangae
The best way to run Django on Google Cloud. This project is now on GitLab: https://gitlab.com/potato-oss/djangae/djangae
Stars: ✭ 576 (-5.26%)
Mutual labels:  django
Pdpipe
Easy pipelines for pandas DataFrames.
Stars: ✭ 590 (-2.96%)
Mutual labels:  data-science
Graphite Web
A highly scalable real-time graphing system
Stars: ✭ 5,384 (+785.53%)
Mutual labels:  django

The MovieGEEK Installation Guide

The MovieGEEK is a website implemented to accompany my book, Practical Recommender Systems. It is used in the book to show how recommender systems work and how you can implement them. The book describes how the algorithms work and provides more detail into how the site works.

The website is not intended as a standalone tutorial or a plug-and-play website for you to install and use for your own content.

Thanks!

This site would not be working if it wasn’t for the MovieTweetings dataset and the poster images provided by the themoviedb.org API. I wish to extend a big thanks to both of them for all their work.

Project Setup

Install Python 3.x

The MovieGEEK website requires that you have Python 3.x installed. Practical Recommender Systems does not teach you Python, though. You’ll need to be able to read Python code to understand the algorithms, and, of course, programming experience makes it easier to implement the website.

The Hitchhikers guide to Python provides “both novice and expert Python developers a best practice handbook to the installation, configuration, and usage of Python on a daily basis.” Mac and Linux users should follow instructions in this guide.

Windows users, because installing Python and its packages can be tricky for you, I recommend using the Anaconda package for the simplest install. If you want to, you can use the Windows instructions in the Hitchhiker’s Guide, but I have always used the Anaconda package.

Download source code

You have two choices for downloading the source code – downloading a zip file of the source code or using Git.

  • Downloading a zip file

    From the main MovieGEEK directory on GitHub, click the green “Clone or download” button and choose to download a zip file to your computer.

  • Using Git

    Clone this repository or create a fork in your GitHub, and then clone that instead. The following command will create a copy on your computer. > git clone https://github.com/practical-recommender-systems/moviegeek.git

Create a virtual environment for the project

Before you run the code, create a virtual environment. The Hitchhiker’s Guide provides a good overview if you want more information. Verify that you have virtualenv installed, and if not, read more here. If you followed the Hitchhiker’s Guide or used Anaconda, it should already be installed, though. Use this command to verify it’s installed:

> virtualenv --version

Once you have confirmed you have virtualenv installed, create the virtual environment using the following commands (Anaconda users, please use the Anaconda-specific commands):

  • Non-Anaconda users:
    > cd moviegeek
    > virtualenv -p python3 prs
    > source prs/bin/activate
    
  • Anaconda users:
    > cd moviegeek
    > conda create -n prs python=3.6
    > conda activate prs
    
    Note that 3.6 should be replaced with 3.x, with x representing the version you are using.

Get the required packages

There are Anaconda specific instructions for this step, too; be sure to use those if they apply!

  • Non-Anaconda users

    Use pip to install the required files:

    > pip3 install -r requirements.txt
    
  • Anaconda users

    Thanks, TechnologyScout.net for these instructions:

    > while read requirement; do conda install --yes $requirement; done < requirements.txt    
    

Database setup

Django is setup to run with Sqllite3 out of the box, which is enough to run everything. However, some things will be considerably faster if you install PostGreSQL.

  • If you do want to install Postgres, follow the Postgres installation steps before you create the databases.
  • If you don’t want to install Postgres, jump to Create and populate the MovieGEEKS databases section.

[PostGreSQL-OPTIONAL] Install and use PostGreSQL

Django comes with a database that enables you to run the website without an external database. However, using another database makes it faster. I had good experiences using the PostGreSQL db.

Install and run PostGreSQL

First, install Postgres and run it. Download the correct postgresql version for your operating system here, and follow the instructions on from the download page to install and run it.

Create the database for MovieGEEK

Use PostGreSQL’s admin tool pgadmin to create a database. Name it moviegeek. Write down which username and password you usd to create the database. You will use that information in two steps from now when you change the Django settings.

Install the Python database driver

Once the PostGreSQL database is spinning, it’s time for the Python driver, which enables Django to talk with the database. I recommend using Psycopg. Download it here. Install it following these instructions.

Configure the Django database connection to connect to PostGreSql

If you use a PostGreSQL (or another db) you need to configure the Django database connection for MovieGEEKS, follow these steps. Refer to Django docs here if you need more details.

Open prs_project/settings.py

Update the following:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'moviegeek',                      
        'USER': 'db_user',
        'PASSWORD': 'db_user_password',
        'HOST': 'db_host',
        'PORT': 'db_port_number',
    }
}

Update the USER, PASSWORD, HOST, and PORT fields:

  • USER(db_user): Use the user name you created with the MovieGEEK database
  • PASSWORD(db_user_password): Use the password you created with the MovieGEEK database
  • HOST (db_host): localhost (if you have have installed it on your private machine)
  • PORT (db_port_number): 5432 (the default port)

For more information please refer to the Django documentation link

Create and populate the MovieGEEKS databases

Everyone must follow these steps, whether or not you are using PostGreSQL.

Create the MovieGEEKS databases

When the database connection is configured, you can run the following commands to create the databases that Django and this website need to run.

> python3 manage.py makemigrations
> python3 manage.py migrate --run-syncdb

Populate the database

Run the following script to download the datasets for the MovieGEEKS website.

WARNING: Mac users running Python 3.7 or higher, before you populate the databases, you need to run this command. /Applications/Python\ 3.7/Install\ Certificates.command. More details here and here.

Everyone, run these commands to populate the databases.

> python3 populate_moviegeek.py
> python3 populate_ratings.py

WARNING: This might take some time.

Create an ID for themoviedb.org

You have to create an ID with themoviedb.org to use its pictures.

  • Go to https://www.themoviedb.org/account/signup
  • Sign up
  • Login, go to your account settings and create an API. You can access settings by clicking the avatar in the upper right-hand corner (the default is a blue circle with a white logo in it). Then you’ll see settings on the left.
  • Create a file in the moviegeek directory called ".prs"
  • Open .prs and add { "themoviedb_apikey": } Remember to remove the "<" and ">" When you are finished, the file contents should look something like {"themoviedb_apikey": "6d88c9a24b1bc9a60b374d3fe2cd92ac"}

Start the web server

To start the development server, run this command:

> python3 manage.py runserver 127.0.0.1:8000

Running the server like this will make the website available http://127.0.0.1:8000

WARNING: Other applications also use this port so you might need to try out 8001 instead.

Closing down

When you are finished running the project you can close it down doing the following steps, or simply close the terminal where the server is running.

  • Close down the server by pressing -c
  • Exit the virtual environment

Non-Anaconda users

>  deactivate

Anaconda users

> conda deactivate

Restart

To restart the project again do the following:

  • Non-Anaconda users:
    > cd moviegeek
    > source prs/bin/activate
    
  • Anaconda users:
    > cd moviegeek
    > conda activate prs
    

Start the web server again by running the following command:

> python3 manage.py runserver 127.0.0.1:8000
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].