Anthony Corletti cloud computing. startups. music. etc.

Machine Learning with GoLearn

It’s really easy to build a K-nearest-neighbors implementation in go using golearn.

After searching for ways to start writing more go, especially ways that provide alternatives to familiar languages and frameworks, I’ve wanted to find machine learning libraries in golang because I tend to rely on python microservices and the rich ecosystem of ml libraries.

I’m writing this post using go1.14.4 so let’s dive in to installing golearn and writing up a quick example K-nearest-neighbors implementation.

Read more ...

Breezy ML with StreamLit

Building lightweight ML applications with python, pandas, streamlit, and scikit-learn is a breeze.

Let’s run through a simple example app to illustrate this.

Read more ...

Clean Rest API Error Messages with Python

A great practice in software development is clear error message communication.

Something like "An error occurred. Please try again later.", simply will not do because it’s simply easier to be explicit.

Our goal here would be to ensure that a consistent interface is communicated to our client applications regardless of request.

Tools and frameworks like Ruby-on-Rails make this really easy with it’s ActiveRecord implementation (Active record is literally a design pattern btw).

You’ll find that in most “fully featured” frameworks with ORMs like Rails, Django, Sails, etc, there is some sort of implementation that enables a clean interface for transmitting error messages, but often we don’t want to carry the bloat of these frameworks along.

Enter: types.

Read more ...

Fullstack Kubernetes

I’ve often wondered what it would be like if all software applications (databases, APIs, UI clients, pubsub, secret managers, etc) ran on the same infrastructure, so I’d never have to worry about working with different infrastructure patterns e.g. CDNs, Kubernetes, VMs, Functions, the one off PaaS or BaaS everyone forgot about, load balanced, multi-region, auto-scaling groups, etc!

I wanted; a familiar frontend, a lightweight and unopinionated API layer that plays nice with top data science software and can also be made available as a standalone service, a data layer with a natively distributed design, high fidelity pubsub (ideally with some delivery guarantee), and a secrets manager – all to run together on a kubernetes cluster.

Read more ...

Python Currency Converter

Most internet services are also financial services. From recurring subscription payments, investment banking, issuing transfers and payouts to bank accounts, consumer retail, forex exchanges, bitcoin, payroll services; take your pick, there is plenty of opportunity to work with finance in tech.

Building these services properly and securely should not be a challenge. No one should end up with something like $100.000000000000000034 showing up on their bank statement.

In this post, I’m going to show you how to build a minimal financial service with the use of python, Babel.numbers, FastAPI, and Rates API.

Read more ...