Data Cleaning, Open Source Software, Loops, Automation, Final Project
14.0. Overview
Today we'll be covering a variety of topics, all related to different aspects of working with computers. Ultimately we'll get a first look at our final project in here.
Let's get started!
14.1. Cleaning Data
Processing information isn't always high-tech, amazing, cool, programming. Sometimes, you just need slog through a bunch of data and try to clean it up so you can use it.
Demo: Cleaning text data with grep
14.2. Open Source Software
Open Source Software is software that is (often) freely available and freely distributable.
Demo: The youtube-dl
or yt-dlp
programs
14.3. Loops
Loops exist in all programming languages. We can use loops to quickly work our way through a process that would otherwise be rather tedious.
Demo: Getting music versions of videos using youtube-dl
$ mkdir music $ cd music $ for v in https://youtu.be/RlNhD0oS5pk https://youtu.be/byRcWWITWLw https://youtu.be/nAc6s6xOcXc https://youtu.be/CPK_IdHe1Yg https://youtu.be/CTAud5O7Qqk https://youtu.be/S_CYdTmj7lA https://youtu.be/L0blnTRD2qU https://youtu.be/iGU66wsjIPA ; do yt-dlp $v ; done;
Demo: Creating short clips using ffmpeg
for f in *; do ffmpeg -i $f -ss 25 -t 20 -q:a 0 -map a ${f%%.*}.mp3; done; mkdir fades/ for f in *; do ffmpeg -i $f -af "afade=t=in:st=0:d=2,afade=t=out:st=17:d=3" fades/$f; done;
14.4. Get a copy of this data
Get a copy of this information that you can use for our final project by downloading your songs from here.
For your project, you should have:
- an <h1> header at the top (on your index.html page)
- three questions with an audio file for each one
- green/red highlighting for right/wrong answers (implemented in MusicQuiz-RW fork)
- a link for your version of the project uploaded to the Turn in Work link