I use Python in my day-to-day work for scientific computing and software engineering. Occasionally, however, I find myself working with equipment that only supports MATLAB, and I need to stream information quickly between MATLAB and Python modules.

These days, there are many serialization formats to choose from when programming in Python: JSON, BSON, protobufs, Avro. Unfortunately, MATLAB only offers an official implementation for JSON. The nice thing about JSON is that the messages themselves are very readable. But the downside is that the messages end up huge, resulting in slow send times, and I needed something fast. …


I have been reading more Asian American literature recently, so I put together a list of my favorites. Hope this is helpful for anyone interested in the diversity of Asian American experiences.

Novels


Developing an advanced neural network model in Tensorflow 2 and Keras

Photo by Charles Guan

In this tutorial, I show how to share neural network layer weights and define custom loss functions. The example code assumes beginner knowledge of Tensorflow 2 and the Keras API.

Motivating Problem

For a recent project, I wanted to use Tensorflow 2 / Keras to re-implement DeepKoopman, an autoencoder-based neural network architecture described in “Deep learning for universal linear embeddings of nonlinear dynamics”. My end goal was to create a user-friendly version that I could eventually extend

DeepKoopman embeds time series x onto data into a low-dimensional coordinate system y in which the dynamics are linear.


A brief description of Champion, Lusch, Kutz, and Brunton (PNAS 2019).

Overview

In “Data-driven discovery of coordinates and governing equations,” Champion, Lusch, Kutz, and Brunton develop a method to discover low-dimensional dynamics from high-dimensional systems. Their work is motivated by the recognition that the discovery of governing equations for dynamical systems first requires the use of the appropriate coordinate system. The authors build on SINDy (sparse identification of nonlinear dynamics) by adding an autoencoder into SINDy’s sparse regression framework. The autoencoder serves as a flexible model to find a coordinate transform where the underlying dynamics are simple. …


Photo by Alexandre Debiève on Unsplash

The Spark Gap podcast covers practical topics in embedded electronics, especially relevant for junior engineers getting hands-on with embedded products. Sadly, Karl and Corey stopped releasing new episodes, but the current archive of 53 episodes has great information. I summarize some of my favorite lessons below.

Many lessons will be obvious to the experienced embedded engineer, but I hope there's something new to learn for everyone.

Ep. 3: Powering Electronics

Don't expect to get a clean 5V or 9V from your wallwart power supply.

  • Linear regulators
  • Simple, usually stable with a minimum current
  • Inefficient, power loss = dV * I
  • Special variants
  • Low dropout…


So you’ve taken the Star Ferry, partied it up in LKF, and gazed down on Hong Kong from Victoria Peak. Now what?

Even if this is your second, third, or twentieth trip, Hong Kong has lots to offer.

Catch your dinner in Sai Kung

Sai Kung is in the east side of Hong Kong and is known for its fishing villages. Along the main promenade, you’ll see advertisements for fishing tours, where they’ll take you out on a boat and fish together, then have a meal together back on shore. The restaurants’ fish tanks hold some pretty impressive fish.


As part of the 2017 Open Source Hardware Summit in Denver, local open source hardware companies Sparkfun and Aleph Objects (makers of Lulzbot 3D printers) invited attendees for company tours.

A neat contrast between visiting an open source company and most other companies was the openness. They showed us the entire facility, answered all of our questions, and even encouraged us to share what we saw.

Sparkfun

Recently, I’ve been wondering what value Sparkfun adds over buying cheap boards on Banggood. After visiting Sparkfun, I think it comes down to the awesome learning resources and the quality. Sparkfun developers for a…


I recently traveled to Denver for the Open Source Hardware Summit and had the chance to explore around the city. It was also the weekend of the Great American Beer Festival and Zombie Crawl, so Denver was packed! Here are some fun things to do in Denver (items in bold font are places I’ve been to).

Neighborhoods

Denver’s many neighborhoods each have distinct personalities, lending Denver a larger city feel while still being walkable. Some of my favorite neighborhoods were:

LoDo (Lower Downtown)

Union Station in LoDo is the first stop for many arriving in Denver, especially if you take the train from the…


I recently started working as an Embedded Software Engineer. Many of my peers ask what Embedded Software even is, as there are few resources for people interested in understanding Embedded Software.

I saw this article by D-Rev for people interested in a career in design and social impact and was inspired to compile a similar list for Embedded Software. Hope you enjoy it! If you have something to add, leave a response.

Thanks to Vikram and my mentors for contributing their own advice.

So, what is Embedded Software?

Embedded software is software for hardware. Embedded software controls hardware devices or interfaces directly with the electronics…

Charles Guan

PhD Candidate at Caltech

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store