春江暮客

Summary of various string segmentation methods in Python

TECHNOLOGY
Summary of various string segmentation methods in Python

Today I will introduce to you various string segmentation methods that can be used in Python. They are

Python Script to Snatch Recently Expired Domains

TECHNOLOGY
Python Script to Snatch Recently Expired Domains

'Many domain enthusiasts scour forums and websites frantically searching for and snatching up suitable domains, even spending heavily to buy desired domains from their owners. International domain management bodies adopt a "first-to-apply, first-to-register, first-to-use" policy. Since domains only require a small annual registration fee, continuous registration grants you the right to use the domain. Because of this, many domain resellers (commonly known as "domaining pros") often spend heavily on short, easy-to-remember domains. I used to think about buying shorter domains for building scraping sites, but unfortunately, both snatching and buying from others were very expensive. Since it"s first-come, first-served, we can also acquire good domains by registering them before the current owner forgets to renew.'

python3 solution to LeeCode medium problem

TECHNOLOGY
python3 solution to LeeCode medium problem

This is an article analyzing a problem from the coding practice site LeeCode.

How to Properly Make Venn Diagrams Using Python Packages

TECHNOLOGY
How to Properly Make Venn Diagrams Using Python Packages

In Venn diagrams of two sets, there can be two (or more) overlapping circles representing sets of different sizes, but the circles are the same size. Actually, the circles should be proportional to the size of the sets, and the overlapping area should also be proportional to the data overlap.

Calculating the Gini Coefficient and Plotting the Lorenz Curve with matplotlib

TECHNOLOGY
Calculating the Gini Coefficient and Plotting the Lorenz Curve with matplotlib

The Gini coefficient and Lorenz curve are widely used to represent data inequality, especially wealth inequality. However, currently in Python, there isn't a very good function to directly plot the Lorenz curve. Since the current project requires it, this article records how to use numpy, pandas, matplotlib, and other packages to calculate the Gini coefficient and plot the Lorenz curve for practical use.

Bayesian Theory and Practical Python Applications

TECHNOLOGY
Bayesian Theory and Practical Python Applications

Bayesian theory provides a principled method for calculating conditional probabilities. With it, we can easily compute conditional probabilities for events where intuition often fails.

Fetching Stock Data Using Python's yfinance Package

TECHNOLOGY
Fetching Stock Data Using Python's yfinance Package

Historical stock data is a very important kind of time series data, playing a significant role in data science. Let's start learning how to handle time series data, preparing for future stock prediction and analysis.

Using folium to Draw a COVID-19 Pandemic Map

TECHNOLOGY
Using folium to Draw a COVID-19 Pandemic Map

After being contained in China, the COVID-19 pandemic became increasingly severe worldwide. Countries and regions publish daily new infection and death data to help fight the pandemic globally.

Mounting Oracle Object Storage using s3fs-fuse

TECHNOLOGY
Mounting Oracle Object Storage using s3fs-fuse

My previous article, "Getting Free Oracle Cloud Servers and Automating Deployment with Scripts," explained how to use the CLI to acquire free Oracle machines. Oracle's free tier offers a total of 100GB of disk space, but you can also mount an additional 20GB of object storage as a local file system. This is especially convenient for data migration, as the data can be easily mounted to another instance. This article will show you how to enable free Oracle Object Storage and mount it as a local drive on a Linux system.

Efficient Ways to Check If a List or Tuple Is Empty in Python

TECHNOLOGY
Efficient Ways to Check If a List or Tuple Is Empty in Python

In Python, to check whether an array or tuple is empty, there are three methods: comparing with an empty list, checking the length, and using an if statement.

Deploying a Flask Docker App Using Okteto’s Free Container

TECHNOLOGY
Deploying a Flask Docker App Using Okteto’s Free Container

I just saw a post on the forum about Okteto's free containers, and since I hadn't registered before, I decided to deploy my site's Flask app using Okteto's free container. Okteto's free Kubernetes plan offers generous resources: 4-core CPU, 8GB RAM, 10GB SSD — basically a great VPS for free. Here's how to deploy using Okteto.

Detailed Explanation of Confusion Matrix in Machine Learning

TECHNOLOGY
Detailed Explanation of Confusion Matrix in Machine Learning

In machine learning, after collecting, cleaning data, and designing preprocessing algorithms, how do we know the effectiveness of the algorithm? How to evaluate if the predictive model can classify effectively and how accurate the classification is? This involves the confusion matrix, which is widely used to evaluate classification problems in machine learning.