- Access: change the pesmissions on the PEM: chmod 600 polymath.pem
SSH Access: ssh -i polymath.pem [email protected] USER: ubuntu
From Polymath dir: % source venv_polymath/bin/activate
% cd /home/ubuntu/Polymath/polymath/models
ml_models.py
/home/ubuntu/ --- Polymath | ---- polymath | --- media --- models (ML related) --- polymath (django project) --- static --- templates (html files) --- users (subscription, users management...) --- sports | -- nfl -- nba -- naccb -- naccf
- The following command will open a postgres command prompt in which you can view DB content.
% psql -d polymath
- To get commands list from the command line: polymath-# ?
sudo systemctl restart supervisor
- Copy the gunicorn_start.bash to the user home directory
- Use the NginX conf file
The cron script is scheduled to run at 03:00 EST. It executes: /home/ubuntu/Polymath/polymath/daily_run.sh The former script runs the R master scripts and load the updated CSV files onto the DB.
A log file with the run errors loading the CSV files: /home/ubuntu/daily_CSV_run.log
A log file with the run errors running the R scripts: /home/ubuntu/daily_R_run.log
-
Update the subscription plans in the admin panel and settings.py: 1.1 settings.py : 1.1.1 Put the new subscription IDs instead of the old ones. 1.2 admin: 1.2.1 Insert the Stripe Plan_ into each plan ID 1.2.2 Update the price and the status
-
Add sports in the admin (just the name, e.g. NFL) 2.1) Setup the
-
Load the predictors for each sport to the admin area.
- Make sure to uodate the sport_id in the CSV file
- From the sports directory (where the dataentry.py is) run from shell: export SPORTS_DATA=$PWD
- Make sure dataentry.py script was and is executing on a daily basis, to load the latest FInal CSV files
- Add predictor variables (HomeWin, HomeScore...)
- Add Algorithms
- Make sure to have the predictors for that sport. Upload them to the admin (make sure you change the sports ID in the CSV file according to the sport in the admin)
- Inside each sport a user_models directory to hold the models users creating
- Add the run script to the crone file for execution
User: polymath_admi Pass: Polymath2020!
user: [email protected]
- An alarm was set on AWS to trigger when a system status check fails.
** Stripe dashboard: https://dashboard.stripe.com/
There are three plans in use at the moment: VIP Monthly, Basic Monthly and FREE. Theses names are "hard wired" into the code, so to use the flow below (change the plans attributes), you should be using on these three names. Adding more plan names will require additional coding.
- Go to: http://127.0.0.1:8000/manage-stripe/
- Enter plan details
- Click Add Plan to create the plan
- Activate the status of the plan from the admin area.
** Check that it's added to the page table (top), and to the admin.
- Same page.
- Make sure you see the Plan ID from Admin on this page
- Copy/Paste into the plan deletion field
- Click Delete Plan
** Make sure to delete the plan manually from the admin area as well.