This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
import subprocess | |
import ffmpeg | |
import librosa | |
import numpy as np | |
import time | |
def extract_peaks(y, sr): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import cv2 as cv | |
import numpy as np | |
import sys | |
import pygame | |
gscale1 = "$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\|()1{}[]?-_+~<>i!lI;:,\"`'. "[::-1] | |
thresholds = [x * 5 for x in range(70)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose') | |
const QuestionSchema = new mongoose.Schema({ | |
description: String, | |
image: { | |
type: String, | |
required: false | |
}, | |
alternatives: [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create one quiz question | |
router.post('/questions', async (req, res) => { | |
try { | |
const { description } = req.body | |
const { image } = req.body | |
const { alternatives } = req.body | |
const question = await Question.create({ | |
description, | |
alternatives, |