Just for a quick refresher, let’s consult Redux Thunk’s docs:
“With a plain basic Redux store, you can only do simple synchronous updates by dispatching an action. Middleware extends the store’s abilities and lets you write async logic that interacts with the store.
Redux Thunk middleware allows you to write action creators that return a function instead of an action. …
So I decided to build a desktop time tracker using arbtt, the automatic, rule-based time tracker to start collecting some statistics about myself and how I spend my time.
The motivation behind this project was actually me simply wanting to use this cool Recharts library but realized that collecting insightful data about myself became the bigger reason. Because of this, I’m thinking of expanding this project in the future to log my web activities as well and perhaps make a separate article for it, but for now, it’s just desktop programs.
Without further ado, let’s get started.
First, we’ll need to install arbtt. arbtt provides an easy way for you to collect data on time spent on your desktop and should automatically run in the background after installation. …
As a developer who barely knows anything about ML (machine learning), I find building a recommendation engine one of the easiest projects to get started with ML. It is practical and not that difficult to understand for beginners with no machine learning background to jump right into.
Before we get started with the actual implementation, I’ll briefly go over some concepts that you might find helpful to build a recommendation engine.
There are essentially three types of algorithms that your recommendation engine could use when recommending an item to a user:
This type of filtering looks at the general trends and popularity of an item based on users with similar demographics. This means that users with similar demographics are recommended the same items and personalized recommendations are very limited. …
Getting started with using Redux and Redux Thunk in your React app
As your react application gets larger, it gets harder and harder to keep track and maintain your states. This is where Redux can come in to help; it is a state management library that provides you with a central state (called the store), eliminating the need to pass props between components.
A quick run through of how Redux works:
If you don’t already know what Redux is, I’ll recommend you to first read my other article on Redux here. …
A step-by-step guide to getting started with web scraping in Python
Although this guide will use mostly basic Python and HTML, because they are very beginner-friendly languages that resembles English, there is really no need to know anything about these languages. However, for the final part, you do need to understand basic CSS, and if you don’t, feel free to skip it. Anyways, without further ado, let’s started!
Just like how it sounds, web scraping is a method of extracting data from a website, where the scraped data would then be saved into a tabular (spreadsheet) format, often for further work to be done on it. …
Tkinter is a built-in Python GUI framework that is lightweight and easy to start with. It is also cross-platform, which means the same Python code will work on Windows, macOS, and Linux. However, the styling of the application is somewhat limited and it is definitely not the most beautiful GUI framework to work with.
Regardless, it is a great choice for building simple projects where functionality trumps aesthetics.
To use the Tkinter library, it is as simple as running one line of code:
from tkinter import *
We define a new class called
Application that inherits the
Tk class from the Tkinter library. Next, we initialize a constructor for our class with our chosen layout manager. …
In my experience, going from native Android development to React Native has simply been a pleasure. Although there is generally less flexibility, development is much faster and cleaner in my opinion, and I just love it. So without further ado, let’s get started.
React Native is a library that works with the React library to render out native components to an iOS or Android device. Therefore, you will need some knowledge of React to dive into React Native.
It’s sad to say, but this series is finally coming to an end. I decided to end it because I don’t want to drag it on for too long and also because I think seven is a great number to end with. Lucky seven, you know?
OK, so for today’s problem, we’ll be looking at computing the Levenshtein distance (aka edit distance) between two words.
“The Levenshtein distance (a.k.a. edit distance) between two words is the minimum number of single-character edits (insertions, deletions or substitutions) required to change one word into the other.” — Wikipedia
Note: This problem comes from LeetCode. …
Today’s problem is challenging — a classic problem you may have seen in your algorithms courses. For those of you who’ve already seen it, this will serve as a great comprehensive review. If it’s new to you, take your time to digest it all.
Let’s take a look at the problem.
n jobs, where every job is scheduled to be done from
endTime[i], obtaining a profit of
You’re given the
profit arrays. …