Quarantine Life

I totally forgot I had a blog until I got notified that I needed to renew my domain name a couple days ago. Do people even read blogs nowadays? Is the cool thing to write a Medium post or make YouTube vids now? I started this blog back in 2015(!!!!!!) and I’m 26 now and no longer that bright-eyed, sleep deprived college kid. I’ve evolved into a sleep deprived adult! I read though some of my non-technical posts, and was honestly kind of half impressed half dying of cringe at my writing. Despite the cringe, I kind of want to write more…. Apparently there are still people visiting this blog daily, which is really cool honestly. I appreciate you guys! ٩(●˙▿˙●)۶

However, since I wrote the speech to text stuff, natural language processing has taken HUUUUUGE strides such that Sphinx probably isn’t your best open source tool anymore. My work now heavily focuses on ML actually, so don’t worry I’m actually saying that as a professional who knows what she’s talking about. Since I do want to continue this blog even if nobody’s reading, I should make some new posts about that…. Hmm! Maybe I will!

I figure I should generate some content since I’m here… so here are some life updates on my quarantine life.

I got into plants

No pics though because its like 12am and I’m realizing I never take photos of things that aren’t my dog. I do have a monstera and a sansevieria and a ficus plant I’m really proud of. I kept them alive for a whole year!

BTW I have a dog!

Started to learn music production

Music has always been a passion of mine, and I’ve always loved singing. I decided to put some effort into learning Logic Pro, with the eventual goal of making my own songs. I’ve covered a few so far, and I’m pretty proud of myself. Logic Pro is so complicated, but I think I’m kinda getting it. Working on my Spotify debut song right now!

I can cover songs in 3 languages btw! 😀

Ate a bunch of ramen and soylent

Ugh, I realized cooking requires a TON of motivation which is really hard to find when you’ve been alone for a year. I’ve gotten pretty creative with my instant ramen and honestly Soylent doesn’t even taste that bad now. Is this… a win or a lose though I can’t tell.

that’s it

I did some other stuff, got into an MMO, joined some twitch streams, started journaling a lot, ran a bunch of half marathons, worked up the courage to openly disagree with a friend, started seriously looking for a boyfriend, learned full-stack development, found out shopping for clothes is actually really fun, got into GPU programming etc etc etc. But this isn’t a YouTube vlog, so I’ll just stop here. Thanks for reading this update on the last year of my life, I hope both yours and mine will be full of things to look forward to in the months to come.



It’s time for my bi-annual post on this blog to remind myself that yeah I’m still paying for this domain name and for the server space used to host my site. Don’t worry everyone, I’m still here and still answering all your steganography and STT questions. (。•̀ᴗ-)✧

My work has recently ramped up a bit, which is pretty awesome. Last week, I learned a lot about Bayesian inference because I had to give a presentation on a package that used it despite me never having taken statistics in college. Then on Friday I got to take a deep dive into Ceres, which is a numerical optimization framework. If my boss says it’s ok, I think I’ll make a blog post about them at some point since explaining concepts to other people also helps me learn it better. Ceres in particular is some next level black magic.

Anyway, I need to make a post about something, so here are two samples of Paparazzi by Lady Gaga that I’ve been learning how to sing. I don’t have a lot of stamina, so I really admire singers with powerful vocals. I’m trying to decide which version of the song I like better. I think the high version I could probably spin to be the more innocent sounding of the two. The lyrics can actually be pretty dark if sung the right way, haha. Also, these are rough drafts!! Recorded on my phone in one take, so I’ll come back and edit this post if I ever decided to do this song properly.

Hmm, can I make this one more like “oh no I really like this guy (°◡°♡).:。”
And I could spin this one to “oh no I REALLY like this guy ɾ⚈▿⚈ɹ”

Hope to talk to everyone soon.
– Sophie

Perfect The Way You Are

When I was 7, my grandma came from China to help raise me since both my parents were working full time jobs. As part of our daily routine, I would walk home from school during lunch and we would watch Mr. Rogers together over whatever delicious meal she prepared. Neither of us knew English well enough to understand what he was saying, but even kid me understood that Mr. Rogers was saying something important when he looked at the camera and sang, “I’m glad that you are the way you are.”

Adult me had completely forgotten about that idea until I heard it again in the recent documentary Won’t You Be My Neighbor?

That film got me good. I was inconsolable after finishing it, mainly because they included a snippet of Fred Rogers’ 2002 Dartmouth commencement speech.

Seriously watch the whole thing, but if nothing else, the most important line for me was:

You don’t ever have to do anything sensational for people to love you.

[Read more…]

Caesar Cipher Generator

I wanted to post something kinda secret, but also on this blog. So I figured I’d do it in a cipher, so if people want to read the message they’d at least need to put in the work to decode it. 😉

Here’s a quick script for generating a caesar cipher, where each letter in the word is shifted by some common number. I’ve included a fast implementation of a decoder in circumstances where the shift seed is unknown. It takes advantage of the letter frequencies of the English language to make some guesses at possible shifts. It’s definitely imperfect, so I might go back and edit this post later if it comes to it.

Python A* path search algorithm with wall destruction

I recently stumbled across Google’s foo.bar challenge, and it’s quite an interesting set of problems! I got through the first couple levels without much difficultly, but level 3 is kicking my butt. I finally solved this maze problem after a day, so I’m posting it here to explain my thought process and because I’m pretty proud that I learned how to A* in the 5 hours or so I spent on the question.

Anyhow, the original challenge is twofold. First, given a maze represented by a grid of cells, find the shortest path you can take to get from the beginning to the end of the maze. Secondly, solve the maze again with the additional ability to now destroy one wall in your path. Though I’m sure there are many approaches one could take to solve this, I went with modified A*.

(No cheating on the challenge if you’re currently taking it! I really enjoyed the learning process I went though while taking the challenge, so don’t rob yourself of that opportunity! °˖✧◝(⁰▿⁰)◜✧˖°)
[Read more…]

Smile detection using OpenCV + Designing a ROS node

An implementation of smile detection using OpenCV, cv_bridge, ROS and Python is available in full at the bottom of this post.

I’ve been developing in ROS for awhile now, and I’ve settled into a pattern for creating nodes that I find works really well for me. It has three components:

  1. Create a single class that encapsulates the entirety of what the node is supposed to do
  2. All subscriber callbacks are restricted to saving the content of the message to a member variable to hold until ready to be processed
  3. Have a run function in the code that is the main ROS loop, and calls the update functions to process data

Functionally, it looks like this:
(I’m using FaceFinder as an example)

[Read more…]

How Far I’ll Go

Moana was a great movie, and I liked how it had a really compelling hero’s journey with a main female character that didn’t fall in love with anyone! Also the music is amazing, so here’s a small tribute to my favorite song in it.

On reflection, the message in the song is a pretty positive one. During my work at Amazon Robotics, we’re always told to “Think Big” and have a “Bias for Action”. In other words, staying in the shallows where results are always known will also cause you to develop code/products that are squarely inside the box. Sometimes it takes a big failure in order to see possible paths for improvement in ways one couldn’t have otherwise known. Well, of course impulsively jumping into the ocean like Moana on her first voyage is a bad idea–but we’re all smarter than that. 😉

Image Steganography in Python

Second Title: Hiding Secret Messages in Cute Pictures of Dogs

What is this pupper hiding???

I developed this activity to as an interesting way to introduce students taking the foundation level software class at Olin to image manipulation and binary math. Since I spent quite a bit of time working on it, I wanted to publish the entire thing as a blog post in case other people on the web are interested in steganography. This exercise was modified from a similar one found at Interactive Python, though this version encodes an image into another image instead of ASCII text.

Because I wrote this as a learning exercise, there’s a neat little repo that holds starter code and solution code. You can clone/fork it here. The starter code is in steganography.py and has some missing functions for you to fill out, while the full solution is in solution.py. There are two main functions to this code. The first is a decoding function that can extract secret information from an image file, while the second is a function that can encode secret messages into images.

This code uses the Python Pillow library. You can install it using pip if the package is missing from your computer by typing sudo pip install pillow into your terminal window.

If you don’t wanna learn about how to do steganography and just want a neat script that will hide messages in images for you, you can use the code in solution.py. It is also embedded at the end of this post.

What is steganography?
In a nutshell, the main goal of steganography is to hide information within data that doesn’t appear to be secret at a glance. For example, this sentence:

Since everyone can read, encoding text in neutral sentences is definitely effective

turns into

Secret inside

if you take the first letter of every word. Steganography is really handy to use, because people won’t even suspect that they’re looking at a secret message–making it less likely that they’ll want to try to crack your code. In the past, you may have tried to accomplish this kind of subterfuge using invisible inks or using special keywords with your friends. However, as fearless coders we have access to fancier ways to sneak data around. *evil laughter here*
[Read more…]

He is the sad frog trapped in a pot.

Okay, this one is more a “People” post directed towards some thoughts that have been rolling around in my head lately rather than a specific person.

Kind of heavy for a public blog post, but hey! These are the kinds of things I think about, for better or for worse. Next post will have more levity, promise. 😀

“Forgive me,” He whispers to me in low tones, “I don’t mean to be happy.”
How can he, when the one he hates is himself? He says that its easier this way, because it grants him an excuse. He looks for brighter avenues because that’s what people say he should do, but consoles his wholly failed half-measures with the reprieve of being hated. To him, his daily defeats are wounds only bearable because he knows he has already failed. He sits in a little hole dug by his hatred, face buried in his arms so the rocks tumbling into his pit hurt less.

The one he hates is himself.
A comforting sureness of who he is, in one pair of eyes at least. He hides behind this ugly excuse, crouching lower so as to let the hatred smother him faster.

“Forgive me.” He says to the world
“I don’t mean to be happy.” He cries into his arms.
But he’s forgotten that the world doesn’t give a shit. He won’t be glossed over. He won’t be forgotten, forgiven, have nothing expected from him just because he is hated. His pit is a pothole, and he will naturally be run over if he insists on sitting in the middle of an avalanche.

I want to shake him from his dark reverie, tell him to take one step–just one step!–out of that hole. But I know that the walls of his prison stretch high, and this yawning cavern only echoes back his ironic fear of the world outside. He insists on staying.

It is not my place to tell him what he needs to do, I know that. It is also not my place to assume that I know what is best for him. But I do so want to see his face, the original–unhidden by tearful creases and shadowed hatred.

Algorithm for solving Knights Tour with Python(revisited)

The original Algorithm For Knights Tour was a pretty popular post, so I decided to revisit it thanks to an interesting email I got. This implementation has a couple changes:

  • You can define a ruleset for locations the knight must be at any given move
  • You can define whether the path needs to be closed or not (Knight returns to starting position)
  • There’s a visualizer now! (You’ll need to have pygame installed for it to work though)
  • No more ugly exiting using sys.exit(), we catch custom exceptions this time around

Here’s what the visualizer looks like:
(pink because pink is the best color obvs)


The tour code is mainly the same as the original post, but with the added custom exception class and booleans. Lines 137-146 deal with obeying to a custom tour ruleset 
[Read more…]