Musings of a dad with too much time on his hands and not enough to do. Wait. Reverse that.

Month: June 2019

Graduation Songs

Now that the hustle of the graduation season is dying down, I’m trying to write up a few notes that might save the rest of you some time planning around such momentous times in your family. One note is on different songs I’ve chosen in the past to help celebrate my kids’ academic accomplishments. Here is my list of favorite graduation songs, but unlike a lot of the other lists out there, I’m going 80s and 90s old school with this one:

School’s Out – Alice Cooper

I remember singing this song with my friends on the bus as it carted me home on many last days of school. Given all the security tensions around schools these days, though, you may be better off skipping this one or relegating it to background music.

Time After Time – Cyndi Lauper

A big song from my youth, although I much preferred her Goonies song over this one.

Forever – Kenny Loggins

Sure, Forever seems to be primarily a love song, but with lines like, “even when I’m gone, you’ll be here with me,” you can’t help noting that, after years of forging friendships, your graduate will be leaving those friends for new experiences and likely only taking fond memories with him.

Don’t You Forget About Me – Simple Minds

It’s interesting how my kids have picked up on certain notables of my youth including the movie The Breakfast Club. The movie and soundtrack were big back in the day and this song has certainly held up well.

The Future’s So Bright, I Got to Wear Shades – Timbuk 3

I suspect this song’s a subtly cynical observation on the future of humanity, but on it’s surface, it’s a fun song about reaping the benefits of your hard work.

Friends – Michael W. Smith

Holding with the theme that even though your new phase in life might have you moving far away from your friends, you’ll always take your friends with you in your heart. A big hit in Christian youth groups everywhere back in the day.

The Time of My Life – Bill Medley and Jennifer Warnes

Part of the soundtrack of the smash movie Dirty Dancing, The Time of My Life, like a true graduation song, stops to appreciate that these last few moments–days, months, years?–have been fantastic experiences for the singer and it’s all because of the person(s) that he surrounded himself with.

I Will Remember You – Amy Grant

I find the opening verse of this song particularly touching:

I will be walking one day
Down a street far away
And see a face in the crowd and smile
Knowing how you made me laugh
Hearing sweet echoes of you from the past
I will remember you.

These Are The Days – 10,000 Maniacs

Underneath, this song seems to celebrate the process of youth maturing in their sexuality. On the surface, it’s just a fun song asking its listeners to appreciate the present moment.

I Will Remember You – Sarah McLachlan

Two years after Amy Grant’s I Will Remember You, Sarah McLachlan came out with another song of the same title hitting on that same theme of friends who find their lives diverging from one another.

Good Riddance – Green Day

Taking a substantial departure from their punk inclinations, Green Day came out with this acoustic ballad in 1997 to help graduates–and likely all others embarking on major life changes–take stock and appreciate the good events in their pasts as they head out on new and separate paths.

Graduation – Vitamin C

This is probably the quintessential graduation song and should definitely be in your playlist for such events. It even borrows from Pachelbel’s Canon, a piece commonly played at graduations today.

Ten things I like to do in Jupyter Markdown

One of the great things about Jupyter Notebook is how you can intersperse your code blocks with markdown blocks that you can use to add comments or simply more context around your code. Here are ten ways I like to use markdown in my Jupyter Notebooks.

1. Use hashes for easy titles

In your markdown cell, enter a line like this:

# This becomes a H1 header/title

That line will render as a header (h1 element).

2. Use asterisks and hyphens for bullet points

Try these lines in your markdown cell:

* this is one way to do a bullet point
- this is another way to do a bullet point

Both render as bullet point lists.

3. Use asterisks and underscores for emphasis

Next, try this:

*these words become italicized*
__these words become bold__
Wait…that didn’t render quite as expected

The phrase I wanted to italicize italicized and the phrase I wanted to bold went bold, but both phrases rendered on the same line. What gives? I’ve noticed that some markdown behaves like this, but here’s a simple solution: add a <br> (HTML for line break) at the end of each line where you want a line break. So, write this in your markdown cell:

*these words become italicized*<br>
__these words become bold__

4. Center my headers with some HTML

Instead of using the hashtag shortcut, code your header elements directly and style them to center:

<h1 style="text-align: center">This header is centered</h1>

Interestingly, I’ve noticed that my centering works in Jupyter Notebook, but not in Jupyter Lab.

5. Create thick dividing lines with HTML

My notebooks that do a lot of exploratory data analysis before jumping into data modeling can get quite lengthy. I find that a nice, thick dividing line between sections can be a great visual indicator of the changing focus of my notebook. In a markdown cell, give this a try:

<hr style="border-top: 5px solid purple; margin-top: 1px; margin-bottom: 1px"></hr>

6. Write mathematical formulas

I’m more coder than math guy, but a formula or two can sometimes be helpful explaining your solution to a problem. Jupyter markdown cells support LaTeX, so give this a whirl:

linear regression: $y = ax + b$
two dimensions: $y = a_{1}x_{1} + a_{2}x_{2} + b$
Ridge Regression: standard OLS loss function + $\alpha \times \sum_{i=1}^{n} a^{2}_i$

7. Create hyperlinks

Hyperlinks are easy in markdown:

[Google](https://google.com)

8. Drop in images with HTML

A picture is worth a thousand words:

<img src="mind_blown.gif" style="max-width:50%; max-height:50%"></img>

9. Create nice tables

Use pipes and dashes to create a table in your markdown:

|| sepal length (cm) | sepal width (cm) |
|----|----|----|
|0|5.1|3.5|
|1|4.9|3.0|

10. Escape text with three tick marks

Occasionally, I’ll want to show a code snippet in my markdown or other kind of escaped text. You can do that by surrounding your snippet with three back-tick characters:

```
sample code goes here
```

Bonus: change the background color of your markdown cells

It never occurred to me until recently, but Notebooks bring with them a variety of style classes that you can leverage in your own markdown. Here are four examples (note: this is yet another markdown trick that works in Jupyter Notebook, but not in Jupyter Lab…at least the version I’m presently running):

<div class="alert alert-block alert-info">
This is a blue background
</div>
<div class="alert alert-block alert-warning">
This is a yellow background
</div>
<div class="alert alert-block alert-success">
This is a green background
</div>
<div class="alert alert-block alert-danger">
This is a red background
</div>

For all of this code, check out my notebook here. Also, here are two other great posts on more markdown tips and tricks.

Graduation Party media

My eldest graduated high school this year and, to celebrate, the wife and I threw her a graduation party. I’ll spare you the to-dos and checklists for throwing a graduation party–I left those largely to my wife as it is. Instead, I’d like to focus this post on the media aspects of the party.

I’m a big proponent of taking pictures and videotaping those magic moments–and even mundane moments–throughout the lives of your children and family. So, I figured this was the perfect time to pull out those embarrassing pictures and video from the past so that all her friends could see.

For the party, we rented an outdoor facility at a local park. We would have access to electricity and I decided to bring two large flat screen monitors to display the media, but I did not want to bring along expensive laptops or desktops to play the media as I didn’t want to risk damaging that equipment. So, what to do? I know: run my media on cheap Raspberry Pis!

The Slideshow

For my picture slideshow, I pulled out about 700 pictures I had of my child from over the years. However I was going to run the slideshow, I knew I wanted to show the pictures in chronological order. So, I came up with this quick PowerShell script to rename the pictures in increasing numbers so that sorting the pictures alphabetically would effectively sort them chronologically:

$pics = gci "C:\grad_party\data\*" | sort {$_.LastWriteTime}

$count = 0
foreach($pic in $pics){
    $count = $count + 5
    mv $pic.FullName ("C:\grad_party\data\{0}{1}" -f ($count), $pic.Extension)
}

(I increased the count by 5 with each loop so that I could easily, manually reorder pictures if needed.)

Now the big question was, on a Raspberry Pi, what are my options to run a snazzy slideshow?

feh

feh is a linux utility for displaying images and its relatively easy to get it started on a Raspberry Pi. The challenge I encountered was getting it to do anything else other than hard transitions from slide to slide. Ideally, I want a slideshow where the slides are in motion and have nice cross-fade transitions: something like this. I don’t know if feh has those capabilities, but I certainly couldn’t get it to inject those effects, so I continued my search.

Python and Pi3D

A solution using Python?! Tell me more! I happened upon a post from TheDigitalPictureframe.com that used a home-grown Python script leveraging a package called Pi3D. The demo video looked close to the solution I was pursuing, so I gave it a try. Unfortunately, despite all the parameter tweaking I tried, I just couldn’t get the final product I wanted. Nevertheless, I would like to circle back someday and do some more experimentation with this approach.

Make the slideshow myself

In the end, I simply used PowerDirector–the software I use to make my annual family movies–to make a video of my slideshow. Then, I just dropped the video on the Raspberry Pi and played it with the built in VLC Player. I even set VLC to continuously loop the video and set the player to full screen to take up the entire monitor. It worked out pretty well and even garnered a few compliments.

The video montage

On a second flat screen monitor and second Raspberry Pi, I played a video montage of nearly 18 years of video highlights of my child’s life. As I’ve been making annual family movies for most of my daughter’s life, it was pretty easy collecting a few minutes of video of her from each year. Here again, I turned to PowerDirector for my solution. I spliced together the video from over the years separating each year with a “year” title and then created a single mp4 video that I copied to my Raspberry Pi and played with VLC player. Like the slideshow, it turned out pretty well.

Background music

“Dad, your music is too old!”

the kid

For the party background music, I pulled out my reliable portable speaker. Initially, my plan was to copy a bunch of my mp3 files to a third Raspberry Pi, play those files with VLC player, and run the audio out into my speaker. Then, the kid complained that my music was too old.

As an Amazon Prime member, I get access to lots of free music. So, I downloaded a few “modern pop” playlists to my phone. My speaker is bluetooth enabled, so I paired my phone to my speaker and then just played those playlists from my phone through the speaker. That worked out pretty well and I was surprised that both my speaker and phone batteries outlasted the three hour party.

So, there are your media suggestions for your child’s graduation party:

  1. Create a slick slideshow “video” and run it from a Raspberry Pi into a large flat screen monitor,
  2. Create a video montage “video” and do the same thing on a second monitor and Pi, and
  3. Download some music for offline play to your phone and bluetooth your phone to a nice, portable speaker.

The slideshow and video all presume that you’re actively photographing and videoing all your family activities. I highly recommend you do that: family vacations, basketball games, and banquets might feel mundane now but they’ll be gold at your child’s graduation party and beyond.

© 2024 DadOverflow.com

Theme by Anders NorenUp ↑