-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
35 lines (25 loc) · 933 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
To get data, run:
./get_data.sh
To import data, run:
python3 manage.py import_cards
python3 manage.py import_ratings
To create recommendations, run (will run in a loop):
python3 manage.py make_recommendations
This will likely eat all your processing powers, so use nice:
nice -n 19 python3 manage.py make_recommendations
To generate statistics (maybe put this in crontab):
python3 manage.py make_statistics
Other useful commands:
manage.py dbshell -- postgresql shell
-- use DROP TABLES name; and then manage.py migrate --run-syncdb to fix some errors
pip install -r requirements.txt
To clear tables:
python3 manage.py shell
from rateme.models import RatingCard, Rating
from django.db import IntegrityError
import os
from django.contrib.auth.models import User
RatingCard.objects.all().delete()
Rating.objects.all().delete()
User.objects.all().delete()
python3 manage.py createsuperuser