Music library streaming app written in Flask & VueJS

Overview

djtaytay

Build Status

This is a little toy app made to explore Vue, brush up on my Python, and make a remote music collection accessable through a web interface. It has a rudimentary file browser. Additionally, it decodes files using ffmpeg, reencodes as webm vorbis and streams them to the browser.

This is an active work in progress. Notably, it needs better authentication, validation against the user input to ffmpeg, and better UI controls.

How to set up a test environment

Prerequisites:

  • Linux (may work on OS X, untested)
  • Docker

Clone this repo, then

virtualenv --python=python3 virtualenv
source virtualenv/bin/activate
pip install -r requirements.txt
echo "export MUSIC_DIR=$YOUR_PATH_HERE" >> .env
echo "export SECRET_KEY=$(python -c 'import os; print(os.urandom(16))')" >> .env
echo "export ADMIN_PASSWORD='super secret password unicorn'" >> .env
echo "export DB_CONNECTION_STRING='sqlite:///sqlite.db'" >> .env
echo "export DEBUG=True" >> .env
python ./initialize_db.py
python ./djtaytay.py

and click here; default username is admin, password is the ADMIN_PASSWORD variable above.

Notes on production deployment

This service works by transcoding media files in memory and serving the content through an HTML5 <audio> tag as an Ogg Vorbis stream. Some browsers will not even attempt to load most of the contents of a stream like this at once, instead opting to stream it in as needed. Long streams like this do not play nicely with Flask's debug webserver; it is highly recommended to run this behind a real WSGI server, like gunicorn. If you find that your streams are being served incompletely, set the --timeout value to a somewhat higher value, like 150 seconds.

Additionally, it is highly recommended to run this behind a real web server to buffer the data from the WSGI server to the client without keeping a WSGI worker busy all the time. Nginx has a similar configuration, send_timeout, that specifies how long a connection is allowed to stay idle before closing the connection. It is also recommended to increase this value to something higher, like 150 seconds as well.

Carefully consider these changes though; these configuration changes make a Denial of Service attack much easier to achieve, by creating a ton of very idle connections to the service. Even if you do not change your WSGI server's timeout and web server's client idle timeout, it is highly recommended to run this service with a real web server and WSGI server instead of the built-in debug server; it is much more performant, reliable, and handles large files much better.

Running a gunicorn-based WSGI server in docker can be accomplished by running run.sh.

Todo

  • add nice playlist functionality
  • handle failures better
  • more style for this bad boy
Owner
Ryan Tasson
taking a break from the regular nine to five to gut renovate a house.
Ryan Tasson
Neural Tangent Generalization Attacks (NTGA)

Neural Tangent Generalization Attacks (NTGA) ICML 2021 Video | Paper | Quickstart | Results | Unlearnable Datasets | Competitions | Citation Overview

Chia-Hung Yuan 34 Nov 25, 2022
Pytorch implemenation of Stochastic Multi-Label Image-to-image Translation (SMIT)

SMIT: Stochastic Multi-Label Image-to-image Translation This repository provides a PyTorch implementation of SMIT. SMIT can stochastically translate a

Biomedical Computer Vision Group @ Uniandes 37 Mar 01, 2022
This is the official source code of "BiCAT: Bi-Chronological Augmentation of Transformer for Sequential Recommendation".

BiCAT This is our TensorFlow implementation for the paper: "BiCAT: Sequential Recommendation with Bidirectional Chronological Augmentation of Transfor

John 15 Dec 06, 2022
GT China coal model

GT China coal model The full version of a China coal transport model with a very high spatial reslution. What it does The code works in a few steps: T

0 Dec 13, 2021
Adjust Decision Boundary for Class Imbalanced Learning

Adjusting Decision Boundary for Class Imbalanced Learning This repository is the official PyTorch implementation of WVN-RS, introduced in Adjusting De

Peyton Byungju Kim 16 Jan 04, 2023
[ICCV 2021 Oral] NerfingMVS: Guided Optimization of Neural Radiance Fields for Indoor Multi-view Stereo

NerfingMVS Project Page | Paper | Video | Data NerfingMVS: Guided Optimization of Neural Radiance Fields for Indoor Multi-view Stereo Yi Wei, Shaohui

Yi Wei 369 Dec 24, 2022
Functional deep learning

Pipeline abstractions for deep learning. Full documentation here: https://lf1-io.github.io/padl/ PADL: is a pipeline builder for PyTorch. may be used

LF1 101 Nov 09, 2022
The 3rd place solution for competition

The 3rd place solution for competition "Lyft Motion Prediction for Autonomous Vehicles" at Kaggle Team behind this solution: Artsiom Sanakoyeu [Homepa

Artsiom 104 Nov 22, 2022
Pytorch implementation of various High Dynamic Range (HDR) Imaging algorithms

Deep High Dynamic Range Imaging Benchmark This repository is the pytorch impleme

Tianhong Dai 5 Nov 16, 2022
Single Image Super-Resolution (SISR) with SRResNet, EDSR and SRGAN

Single Image Super-Resolution (SISR) with SRResNet, EDSR and SRGAN Introduction Image super-resolution (SR) is the process of recovering high-resoluti

8 Apr 15, 2022
Adaptation through prediction: multisensory active inference torque control

Adaptation through prediction: multisensory active inference torque control Submitted to IEEE Transactions on Cognitive and Developmental Systems Abst

Cristian Meo 1 Nov 07, 2022
This is a yolo3 implemented via tensorflow 2.7

YoloV3 - an object detection algorithm implemented via TF 2.x source code In this article I assume you've already familiar with basic computer vision

2 Jan 17, 2022
A map update dataset and benchmark

MUNO21 MUNO21 is a dataset and benchmark for machine learning methods that automatically update and maintain digital street map datasets. Previous dat

16 Nov 30, 2022
Official Pytorch implementation of 'RoI Tanh-polar Transformer Network for Face Parsing in the Wild.'

Official Pytorch implementation of 'RoI Tanh-polar Transformer Network for Face Parsing in the Wild.'

Jie Shen 125 Jan 08, 2023
Bunch of different tools which helps visualizing and annotating images for semantic/instance segmentation tasks

Data Framework for Semantic/Instance Segmentation Bunch of different tools which helps visualizing, transforming and annotating images for semantic/in

Bruno Fernandes Carvalho 5 Dec 21, 2022
For the paper entitled ''A Case Study and Qualitative Analysis of Simple Cross-Lingual Opinion Mining''

Summary This is the source code for the paper "A Case Study and Qualitative Analysis of Simple Cross-Lingual Opinion Mining", which was accepted as fu

1 Nov 10, 2021
PyTorch implementation of the cross-modality generative model that synthesizes dance from music.

Dancing to Music PyTorch implementation of the cross-modality generative model that synthesizes dance from music. Paper Hsin-Ying Lee, Xiaodong Yang,

NVIDIA Research Projects 485 Dec 26, 2022
Wanli Li and Tieyun Qian: Exploit a Multi-head Reference Graph for Semi-supervised Relation Extraction, IJCNN 2021

MRefG Wanli Li and Tieyun Qian: "Exploit a Multi-head Reference Graph for Semi-supervised Relation Extraction", IJCNN 2021 1. Requirements To reproduc

万理 5 Jul 26, 2022
Official implementation for the paper: Multi-label Classification with Partial Annotations using Class-aware Selective Loss

Multi-label Classification with Partial Annotations using Class-aware Selective Loss Paper | Pretrained models Official PyTorch Implementation Emanuel

99 Dec 27, 2022
ZeroGen: Efficient Zero-shot Learning via Dataset Generation

ZEROGEN This repository contains the code for our paper “ZeroGen: Efficient Zero

Jiacheng Ye 31 Dec 30, 2022