A prime number is a positive integer exactly divisible by 1 and itself. In other words, a prime number will have only 2 factors. The first ten prime numbers are.
2, 3, 5, 7, 11, 13, 17, 19, 23
1 is not a prime number because it’s not divisible by exactly 2 positive integers. This article will discuss how to determine a prime number and make it better in terms of time complexity using four different methods.
RSA (Rivest–Shamir–Adleman) algorithm is based on the fact that finding the prime factorization of a large number is hard. When we can express…
In this post, I’ll explain how to Dockerize an existing Flask application. I’m going to use one of my Python projects for demonstration purposes. By using a Dockerized Flask application, other developers can easily run the project without any environment management, which is great for saving time and effort. Moreover, developers can focus on development. If you’re new to Docker, then read the following post where I’ve covered some basics.
What is Markdown? Markdown is a way of writing rich-text (formatted text) content using plain text formatting syntax. From this post, you’ll learn all the Markdown’s major commands that will help you create an awesome GitHub README. I’ll talk about the 11 most commonly used markdown topics. I’ve also mentioned different ways, such as using HTML tags to style your README. If you’re interested, you can have a look at the HTML whitelists on GitHub.
You can download everything I’ve discussed in this post from my GitHub repository. …
Why is self-understanding so crucial? Because you need it to improve. Self-knowledge is how you experience and explain your character, emotions, motives, and wishes to perceive strengths and weaknesses. Then you apply these insights and take actions for self-growth. Mihai Valentin Ciolacu writes in his journal, “The subjects with a higher level of awareness of self-efficacy had a higher tendency of self-improvement (Valentin, 2013).”
There are many techniques to mature into self-aware, such as asking self-reflecting questions: What am I good at? What am I bad at? Although self-reflecting questions have their own merits, sometimes they don’t work for some…
In this post, I’ll explain how to Dockerize an existing Python project. I’ll use one of my Python projects for demonstration purposes. Dockerized application has many benefits. One of the most prominent ones is that other developers can smoothly run the project without any environment management. It can save time and effort, and developers can focus on development. If you are just getting started with Docker, then read the following post where I’ve covered some basics.
Now, I’ll create a…
To promote my medium articles, sometimes I post them on my LinkedIn and Twitter accounts. Since I was repeating the same task over and over again, I wanted to automate this task. So I wrote a bot that updates my Twitter using GitHub Actions and Python on my behalf. It saves me time, and also I don’t have to worry about updating my Twitter.
What is Tesseract? It’s an open-source OCR (Optical character recognition) engine that can recognize more than 100 languages with Unicode support. Also, it can be trained to recognize other languages. An OCR engine can save time by digitizing documents rather than manually typing the content of the document. From this post, you’ll learn how to extract text from images using Tesseract OCR engine and Python.
brew install tesseract
You can use the following command…
In this post, you’ll learn how to deploy Node.js serverless function to Vercel. Vercel provides serverless runtimes, also known as function as a service (FaaS). There is a myriad of benefits of a serverless function, but the most prominent one is that you’re only running the function when you need them. Let’s get started!
A binary search is an algorithm that is used to find an element from a sorted array. This algorithm compares the target value to the middle element of the array. If the values are not equal, and the target value is less than the middle value, then the larger half is eliminated, or if the target value is larger than the middle value, then the smaller half is eliminated. So, after each comparison, the array gets halved. This process is done repeatedly until we can find the target value or we don’t find the target value.
Searching is one of…
Welcome to part two of my self-updating blog catalog series. The primary reason for this post is to improve the time complexity of the
compare_data function. The previous function’s time complexity was O(mn), where
m was the length of the RSS data feed, and
n was the JSON array length. The RSS data feed contains the new data, and the JSON array contains the old data.
After thinking for a while, I got an idea to improve the complexity of function from O(mn) to O(m). …