Batch Extract Win10 Lock Screen Wallpapers Using Python

Windows 10 users might notice that every time they boot up, the lock screen displays a different beautiful image. These images are often selected from outstanding photography works and are quite exquisite. However, since the system automatically changes these images, even the most beautiful ones might be replaced the next time you start your computer. With the help of Python, we can use a few simple lines of code to batch extract these beautiful lock screen images. By setting your favorite images as desktop backgrounds, you no longer have to worry about them being replaced. ...

March 26, 2018 · 2 min · Zhiya

Understand the Token Bucket Algorithm in 15 Lines of Python Code

When transmitting data over a network, to prevent network congestion, it’s necessary to limit the outgoing traffic so that data is sent out at a relatively uniform speed. The token bucket algorithm achieves this functionality by controlling the number of data packets sent to the network and allowing for burst data transmission. What is a Token? From the name “token bucket,” it seems to be a bucket filled with tokens. So, what exactly is a token? ...

March 20, 2018 · 3 min · Zhiya

The Person Who Loves You the Most Will Help You Understand Blockchain Without Breaking a Sweat

Blockchain is a hot topic these days. You can hear people talking about blockchain or trading cryptocurrencies in any office building elevator. Through this article, I hope to give you a comprehensive understanding of the concept of blockchain. After grasping the concept, the next article will demonstrate how to implement a blockchain network with approximately 300 lines of Python code. Blocks and Chains A block is, well, a block (what else could it be?), and when you link these blocks together one by one, like a chain, it’s called a blockchain (hold your thoughts, keep reading). ...

March 14, 2018 · 4 min · Zhiya

No More Fear in Interviews: Understand the LRU Algorithm with 20 Lines of Python Code

The LRU algorithm is a common topic in backend engineer interviews. This article will help you understand the LRU algorithm and ultimately implement a cache based on the LRU algorithm using Python with ease. What is a Cache Let’s look at a diagram: when we visit a webpage, the browser sends a request to the server, which processes it and returns the page to the browser. When multiple browsers access simultaneously, multiple requests are initiated in a short time, and the server has to perform the same series of operations for each request. This repetitive work not only wastes resources but can also slow down response times. ...

March 6, 2018 · 4 min · Zhiya

Convert PDF to Word Using 60 Lines of Python Code with Multithreading

In the workplace, we often encounter situations where we need to extract text from PDF files. For a single PDF, copying and pasting doesn’t take much time, but what if you need to convert a large number of PDFs to Word documents? Today, I’ll teach you how to use 60 lines of code to achieve multithreaded batch PDF to Word conversion. If you’re not interested in the detailed process, you can skip to the end for the code. ...

March 3, 2018 · 3 min · Zhiya