The code for this entire implementation can be found here: https://github.com/ramdesh/flask-prometheus-grafana-example

Flask is a very popular lightweight framework for writing web and web service applications in Python. In this blog post, I’m going to talk about how to monitor metrics on a Flask RESTful web service API application using Prometheus and Grafana. We’ll be tying it all together using docker-compose so that we can run everything using a single command, in an isolated Docker network.

Prometheus is a time-series database that is extremely popular as a metrics and monitoring database, specially with Kubernetes. Prometheus is really cool because it is…


Here’s two ways to do it

NOTE: The complete code related to this article can be found on this Github repo.

AWS Athena is a service that allows you to build databases on, and query data out of, data files stored on AWS S3 buckets. It is quite useful if you have a massive dataset stored as, say, CSV or parquet files and you don’t want to spend days writing ETL jobs and loading it in to a standard SQL database. It basically allows you to write standard SQL queries to retrieve data from flat data files stored on S3. …


My experience through 2 months of utter insanity that is the current GPU market

As a gamer, getting your hands on a decent GPU in 2021 is an absolute marathon that will leave you exhausted and dispirited. While it might seem like a first-world problem, being able to get a nice GPU when I needed is something I always took for granted and I was sorely disappointed when I tried to buy one at the beginning of this year.

There is a global chip shortage that is severely bottlenecking GPU production and scalpers with armies of bots are securing stock off of every stock drop before any human could and then selling them for…


CODEX

So, it’s that time of year again; Google Summer of Code (GSoC) was announced for 2021, and the list of mentoring organizations was published yesterday. As a former GSoC student from 2011, 2012 and 2015, and a mentor from 2013 and an organization admin from 2014, I thought I’d write up some tips for students who’re thinking of applying this time around. While some things have changed in terms of how the program is managed nowadays (ahem, compensation, *wink wink*), some core tenets stay the same for people who want to apply and engage with this amazing program.

Now, I’m…


How to make sharing model files among data science teams simpler

Photo by Chris Ried on Unsplash

Keras is a very popular framework developed by Google for training and using machine learning models, and it has become somewhat ubiquitous in its use within the domain. In my work I am presented with problems related to building things that make machine learning and its related applications easy for data scientists to use, and one of those requirements was to make sharing model files easier among a data science team.

Serialized machine learning models are almost binary files, making them not very suitable to store and version control using conventional version control systems such as git. The solution for…


The Behat testing framework can be used to write great tests for ATDD

The Behat testing framework advocates the concept of Acceptance-Test Driven Development (ATDD), where human-readable tests are written for highly user-oriented tasks by the developers themselves. This automates the User Acceptance Testing (UAT) process to a certain degree as the tests themselves are not written in highly-technical terminology and follow front-end testing paradigms. Essentially, the idea is that you define a test on how your application should work from the front-end, and then develop that feature from there. Behat works on PHP 5.3 and upwards.

Moodle is a Free and Open Source Learning Management Tool with an active community from all…


Gatling is a popular open source load testing tool that allows you to write load tests as code. It is mainly based on Scala which means you get more out of it by writing less code, and allows a great deal of flexibility in terms of how you design your load test scenarios. It can be used to send millions of requests to an application within a small amount of time, emulating different users working with different use cases.

In some cases, it is more practical to send actual data using Gatling without having to randomly generate test data. When…


Telegram is one of my favorite chat applications — it provides security, super speed, and a myriad of other features that you don’t find in almost any other chat service. Another such service is their Bot framework, which allows the creation of chat bots for Telegram that can do so many different things. Some of these are bots for services such as Gitlab and Bitbucket, which work off of webhooks to send commit details for repositories to a given chat on Telegram.

Amazon Web Services’ CodeCommit is a managed version control service provided by AWS, which can be configured to…


IBM Cloudant

Cloudant is a recently-popular solution for cloud-based NoSQL databases. It is based heavily on CouchDB, and provides a very easy-to-use HTTP verb-based web service interface to carry out database operations.

When using Cloudant with Node.js or Express.js, the Cloudant NPM Package, which is basically a wrapper for the CouchDB NPM package known as nano, comes in handy. …


JavaScript evolves like crazy!

With the advent of JavaScript ECMAScript 6/ECMAScript 2016/ES6, a whole bunch of new features were introduced, most of them being game-changers for anyone who wanted to switch over. My colleague Ragavan and I took it on ourselves to convert one of our existing ES5 NodeJS projects to ES6, and I thought it would be good to put together a base project that anyone could use to bootstrap a typical NodeJS + ExpressJS + MongoDB + REST project using the tools that we used.

We have used the following tools to make this work:

  • Package management: npm
  • ES6 transpilation: babel +…

Ramindu Deshapriya

FOSS Mercenary. Guitarist. Eternal optimist.

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