Browse Source
Refactor audio feat graph
Refactor audio feat graph
Fixes #51. Instead of passing in an array of hard coded values as the interval end points, an object specifying the beginning, the end, and the step size is used. Categories can be more easily defined and modified this way.master
Chris Shyi
6 years ago
5 changed files with 39 additions and 27 deletions
-
2api/utils.py
-
3api/views.py
-
29graphs/static/graphs/scripts/audio_feat_graph.js
-
16graphs/templates/graphs/features_graphs.html
-
16reset_db.sh
@ -1,15 +1,15 @@ |
|||
# check if in virtual environment |
|||
# https://stackoverflow.com/questions/15454174/how-can-a-shell-function-know-if-it-is-running-within-a-virtualenv/15454916 |
|||
|
|||
# python -c 'import sys; print(sys.real_prefix)' 2>/dev/null && INVENV=1 || INVENV=0 |
|||
python -c 'import sys; print(sys.real_prefix)' 2>/dev/null && INVENV=1 || INVENV=0 |
|||
# INVENV=$(python -c 'import sys; print ("1" if hasattr(sys, "real_prefix") else "0")') |
|||
|
|||
# if $INVENV is 1, then in virtualenv |
|||
# echo $INVENV |
|||
# if [ $INVENV -eq 1 ]; then |
|||
rm login/migrations/0* api/migrations/0* |
|||
sudo -u postgres psql -f reset_db.sql |
|||
python manage.py makemigrations |
|||
python manage.py migrate |
|||
python manage.py runserver |
|||
# fi |
|||
if [ $INVENV -eq 1 ]; then |
|||
rm login/migrations/0* api/migrations/0* |
|||
sudo -u postgres psql -f reset_db.sql |
|||
python manage.py makemigrations login api |
|||
python manage.py migrate |
|||
python manage.py runserver |
|||
fi |
Write
Preview
Loading…
Cancel
Save
Reference in new issue