Area charts are a great option when we need to show trends over time while also emphasizing the magnitude of values. They allow us to compare multiple series or variables easily, while the filled area illustrates the magnitude of values, and they also show how a part contributes to the whole over time. In this […]
Tag: coding
Arrays, NumPy, Vectors, Tensors: 0 to 4+ Dimensions Demystified
In the domain of Python programming, data structures are the pillars of efficient and dynamic coding. From the straight-forward one-dimensional lists (arrays) to the complex realms of multidimensional arrays and tensors, Python provides a robust framework to handle and manipulate data. These are not just academic concepts; they are the building blocks of machine learning […]
Categorizing free-form feedback with ML
One of the toughest parts of analyzing survey feedbacks is processing the free-form feedbacks into some quantifiable measures. This is because people express the same thoughts differently, use different styles, spellings, lingos, abbreviations, and not surprisingly, inadvertently introduce spelling and grammatical errors. In order to quantify such entries, we have to arrange each feedback into […]
Handy bespoke helper library you can use in your code
In this post, I’m sharing a script loaded with useful functions that you can use in your code with ease for performing a myriad of necessary and critical tasks without the need to write (and rewrite, test and retest) your code. Just import it and call the function(s) you need. This Python helper library provides […]
A Complete Library Simulation with SQLite Database and Python
I am thrilled to announce that the end-to-end system for a book library is now finished and available for download! It’s a comprehensive package of a preloaded SQLite3 database designed for simulating a book library using Python with all source code and documentation included. The database contains 4 tables (preloaded, and fully documented) and sample […]
Getting Data From A Website Without A Developer API Key
It started with a simple quest: I wanted to look up a word and get its example usage in sentences, along with its meaning without having to search each time. I wanted to just type in a word, and get its basic meaning, and a few example sentences using my own app or script. Yes, […]
Interactive Color Mixing App And Explanation
In this post, I present an embedded Python app that takes two colors as inputs in html color convention (that uses Hexadecimal color codes), and produces a mixed color of the two. Furthermore, the user can also specify the mix proportion or the ratio of the first color to be mixed with the second color. […]
Zip Function in Python: How and Why
The zip() function in Python is very useful, versatile, and efficient for combining elements from multiple iterables (like lists or tuples) into pairs or tuples. No, it’s not the file zipping functions most are familiar with in Windows; despite the same name, it’s an entirely different function for different purposes. Here are some practical scenarios […]
Python teaser/puzzle: FizzBuzz Twister
Objective For numbers 1 through 20, print “Fizz” if the number is divisible by 3 (no need to print the number), “Buzz” if it’s divisible by 5 (no need to print the number), and “FizzBuzz” if it’s divisible by both (no need to print the number). Otherwise, just print the number. For example, for numbers […]
Why use dataclass decorator in Python?
A dataclass decorator in Python is a handy feature introduced in Python 3.7 to simplify the process of creating classes that primarily store data. The decorator generates boilerplate code, like init, repr, eq, and other special methods, making code more concise and readable. Essentially, using dataclasses simplifies the process of creating classes. In this post, […]