Skip to content

mcgeorgiev/six_degrees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SixDegrees

Description

SixDegrees is a game based on the idea of six degrees of seperation. The idea is that all things living or not can be connected within six steps.

How to play

How to play hashids

  • Click on new game.
  • You will be presented with your start and goal articles.
  • Click on the first node to reveal your next possible choices.
  • Progress through the game, clicking node by node until you get to your goal!
  • You can zoom in and around the graph by using your mouse wheel, or pinching on a laptop touch pad!

Click here to play

Installation

1. Clone repository. How to clone a repository

2. Enter a virtual environment.

3. Install the requirements:

$ pip install -r requirements.txt

4. Navigate to /six_degrees/ within the cloned folder and run the following commands

$ python manage.py makemigrations
$ python manage.py migrate

5. The following step only applies if you intend to make a local copy of the database. We strongly recommend you use our hosted version.

You must Install neo4j and change lines 7 - 9 in the six_degrees/six_degrees/game/graph.py to look like the follwing code:

def connection():
    return GraphDatabase("http://localhost:7474/db/data/", username="neo4j", password="password")
    #return GraphDatabase("http://hobby-ekngppohojekgbkepjibeaol.dbs.graphenedb.com:24789/db/data/", username="testing-user", password = "b.SIxCtcPc51R5.aaW8WZa65LdsjGgZ")

Then set up neo4j
  • register account
  • Change password to: password
  • Run neo4j;
  • Run the population script located in: six_degrees/six_degrees/game/populate_graph.py
$ python populate_graph.py

IMPORTANT: this script may take 40-50 minutes to populate the database!

6. Run the population script located in: six_degrees/six_degrees/population_script.py

$ python population_script.py

7. Create a superuser account and follow terminal instructions

$ python manage.py createsuperuser

8. Run the program: six_degrees/six_degrees/manage.py

$ python manage.py runserver

9. Open local host: open

http://127.0.0.1:8000

Table of requirements:

Package Version
beautifulsoup4 4.5.3
Django 1.10.6
neo4j-driver 1.1.2
neo4jrestclient 2.1.1
py2neo 3.1.2
requests 2.4.3
wheel 0.24.0
django-registration-redux 1.4
Pillow 4.0.0

Note:

  • For more reliable quality rendering don’t use safari browser, the pixilation does not always render due to sigma.
  • During periods of inactivity the hosted graph database sleeps. Therefore the first interaction with the graph database is slightly longer than normal usage.