Communicating with embedded systems using Python, part 2

This post follows on from my previous post about working with embedded systems using Python. I highly recommend starting off entering blocks of code (as in the previous post) into a REPL while you debug things, but once you’ve got that set up, it’s worth making the code reusable between projects for you and others to benefit. I’ll cover how to do that and a few other possible improvements Refactor the code into a class You might already see how you could put the connection and setup code into an OptoForce....

October 9, 2020 · 10 min · Alexander Knemeyer

Communicating with embedded systems using Python

I’ve recently started work that involved communication with embedded sensors, using Python. It’s a great language for the laptop/command centre side of a project, since actually communicating with sensors (where using C or C++ may feel more natural) is often a tiny portion of the total development work - you often also need to visualize results, send data over a network, implement a control algorithm, and so on, which is usually achieved more quickly in a high-level language...

October 8, 2020 · 9 min · Alexander Knemeyer

Some unknown Jupyter features

Jupyter lab struggles to compete with fully fledged IDEs, but it’s a better development environment than what some people think. It has features which aren’t exactly hidden, but seemingly aren’t often written about and can take a while to discover independently, so I thought I’d share some small but very useful discoveries! If you’re a total Jupyter Lab beginner, others have already written about other features, in detail. It’s definitely worth learning the keyboard shortcuts - this article mentiones a few...

September 26, 2020 · 4 min · Alexander Knemeyer

It's a detective show, but the protagonist is...

The other day I realised that the trope of “Detective show, but the protagonist is a THING” is incredibly widespread. These are the variations that I have gathered so far. THING is: a zombie who eats brains to solve crimes (iZombie) the devil (Lucifer) an angel (Angel) an eccentric genius (Sherlock) a con artist (The Mentalist) a mystery novelist with writers block (Castle) a criminal profiler who empathizes with serial killers (Hannibal) a white-collar criminal (White Collar) a 14-year-old immature cop (Brooklyn Nine-Nine) a serial killer (Dexter) son of a serial killer (Prodigal son) brothers who fight ghosts ’n stuff (Supernatural) the USA’s most wanted man, being used as a CI to catch criminals (Blacklist) a middle school cop (Filmore) a pie-maker with the power to bring dead people back to life (Pushing Daisies) a newly-wed with the ability to chat to ghosts (Ghost Whisperer) a deception expert (Lie to Me) Most of the time, there’s a buddy detective whose qualities mirror those of the THING...

September 14, 2020 · 2 min · Alexander Knemeyer

Improving the jupyter notebook workflow

Jupyter lab is great, but it isn’t suited to everything In a data science workflow, you might have cleaned your data and be quite happy with it, leading to a section of your notebook that stays relatively unchanged while you work on other parts of the problem. That section can grow quite large, and I find huge notebooks to be quite overwhelming You may also want to share portions of that code with other projects/notebooks...

August 26, 2020 · 9 min · Alexander Knemeyer