Sign in

AI, Software Developer, Designer :
All images by author.

Or how to overcome Integration hell.

Why read this? You want to visualize audio in realtime with Python and find the whole thing intimidating () or you might be having problems integrating complex libraries and want to hear a tall tale of how I solve mine along with some tips.

What are we building ?

We are building a simple* audio waveform viewer from scratch ( ), importantly we want to see this waveform in real time in part because it’s cool and in part because we are visual beings and so this would help us better understand sound (

All images by author.

For the DIY coder.

First question you might have is why ? After all we have perfectly good plotting libraries like PyPlot and others…

Answer: Because sometimes you need to make something not in stock at your charting library of choice, other times you might simply want to avoid integrating libraries or have an easier time without them, and then of course you might just be curious about the do it yourself approach.

⚠️ The logic here should work on any canvas element from your GUI library ( heck, you can also port the concepts to your language of choice ), I am using…

All Images by author

A practical Data Viz solution.

Who’s this for ?

If you are a data scientist or have some data visualization needs in python you are probably using PyPlot, and if you need to interact with your plots or make a standalone program you will need to integrate PyPlot with a GUI library. I am using PySimpleGUI because that's what I use when I want to quickly toss things together and have a working program to demo.

⚠️ Caveat Emptor: There are other patterns and ways to code the same functionality, this is what makes sense to me, if you want to learn more check these related posts: Organizing your…

Blocking and non blocking operations in python


As part of my research on Signal Processing and AI, I wanted to visually represent real time audio data from my microphone, this simple request turned out to be not so simple at all for a number of reasons we will cover, along the way we will see how to integrate PyAudio with a GUI (I use PySimpleGUI but you can modify the code for your UI of choice), and talk a bit about blocking and non blocking operations in Python.

Your time is valuable, I get it. If you just want to copy pasta 🍝some code to integrate PyAudio/PySimpleGUI…

Let me out !

Some months ago I failed an interview question from Google that required me to write a program to navigate a maze in the least amount of steps, it is by no means a small task since a very popular book on AI ( ) devotes a lot of pages to this subject, but what I got stumped with and found more interesting was the code needed to make a maze ( ) and since I like GUIs and games I thought it would be a cool little thing to learn about, so without…

Trying to visualize the thoughts and memories in the brain.

We humans (and other animals) posses the amazing ability of experiencing and remembering things along with higher modes of cognition like thoughts, ideas and feelings.

The name Engram has been given to denote the physical location and mechanisms required to process and store these bits of information. The theory seems sound, there are places in our brains where the aforementioned information is stored () but accessing them is still not possible, at least not directly. We make do with our communication skills to convey what we experience and know internally. The best next thing could be…

Purves, Dale, et al. Neuroscience. Sinauer Associates, 2018.

Gazzaniga, Michael S., et al. Cognitive Neuroscience: the Biology of the Mind. W.W. Norton & Company, 2019.

Russell, Stuart Jonathan, and Peter Norvig. Artificial Intelligence: a Modern Approach. Pearson, 2018.

Buzsáki, G. Rhythms of the Brain. Oxford University Press, 2011.

Sporns, Olaf. Networks of the Brain. Mit Press, 2016.

Koch, Christof. The Quest for Consciousness: a Neurobiological Approach. Roberts and Co., 2004.

Tulving, Endel. The Oxford Handbook of Memory. Oxford Univ. Press, 2010.

Kandel, Eric R. In Search of…

Is this the one?

Like many other developers, I’ve been looking for a Python UI solution for my projects and I have yet to find the perfect one. Under this light, I‘ve been wanting to try out PySimplegui for a while, and so this will be a simple overview with some beginner's code and a more realistic project thrown at it.

Advanced Hello world

I’ve tried so many UI libraries over the years that I usually start with a simple program to get a feel for the API, the script is a simple click counter that is the basis and framework for more advanced programs. …

A bit down and to the left

I love isometric views; they pack a bunch ( ) of visual information and are great for sketching pseudo 3D views, making them programmatically on the other hand has always seemed daunting, at least to me, come along as I face my isometric fears and build one from scratch in python.

Here's a typical isometric Grid/Image and a simple approximation of what's going on which we will use throughout, starting from a simple square you rotate it 45° and then squish it so it is twice as wide as it is tall. 

And 5 reasons you should skip them.

I’ve been competing in the Numerai Quant competitions ( ) for the past 3 years and thought it could be interesting to write a follow up to my previous two posts as a way to catch up…

Previous posts you might like:- Numerai walkthrough: Quantitative Analysis & Machine learning for fun and profit. The practical parts are now outdated, but the introduction explanation is still relevant. - Practical Keras Simple regression for the Numerai Tournament An up to date (late 2020) technical look at setting up a Neural Network for the tournament.

What is it again ?

In a nutshell Numerai…

Keno Leon

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