Blog
[Python] Use enumerate() function to output index and element at the same time

Introduction
enumerate()
is a function often used in Python. Its usage is very simple, just only need use enumerate(iterable, start_index)
. The first parameter enters the iterable object, and the second parameter enters the first number to be counted (Calculate from 0 by default).
Let's take a look at a simple sample code.
Read More »[Python] Use enumerate() function to output index and element at the same time[Linux] How to add users to a specific group

Introduction
The different groups maybe have different permissions in a Linux server, how to add user to a specific group is an important operator.
What I want to record today is about group operations in Linux system, for example: how to change user groups.
Read More »[Linux] How to add users to a specific group[Python] Using package pytube to download YouTube videos

Introduction
Various electronic entertainments of modern people are inseparable from YouTube, whether it is to follow dramas, query tutorial, watch funny videos ... we will watch it on YouTube platform. Saying watching YouTube is the most important thing for modern people.
Sometimes, we will need to download videos from YouTube. Of course, this matter itself is likely to violate intellectual property rights, so our use is limited to teaching and non-commercial use. The downloaded video must be deleted within a certain period of time.
Read More »[Python] Using package pytube to download YouTube videos[Linux] Use "wget" Command To Download Files From Google Drive
Google Drive is a very convenient tool and everyone should be familiar with it. Before recording how to use wget command to download files from Google Drive, I briefly introduce it.
Read More »[Linux] Use "wget" Command To Download Files From Google DriveUse Python pacakge Pillow to convert font files to PNG images

Introduction
Today, I need to plot font files in PNG format and save it, which sounds like a rare requirement. After browsing on the Internet, I found that it can use ImageFont module of Python package Pillow to solved.
At the beginning, I wanted to use the Python package fontTools to solve the problem, but later I found that the Imagefont module in Pillow was better.
Read More »Use Python pacakge Pillow to convert font files to PNG images[Word] Paragraph setting "Left and right alignment" The last line is scattered, and the punctuation marks the problem
Introduction
When using Word to write a paper or report, sometimes due to existence of both Chinese and English in the content, or font typesetting issues, some paragraphs will appear to wrap early. As a result, our typesetting will appear a little messy.
Read More »[Word] Paragraph setting "Left and right alignment" The last line is scattered, and the punctuation marks the problem[Linux] Double-click to execute shell script and add it to the dock bar
Sometimes if we want to execute a shell script on Linux, we need to open the terminal and give the command —— it's too slow! If we often need to use this file, for example, the startup file of an application, we may become very anxious. This is why I am looking for how to double-click to execute a shell script on Linux.
Read More »[Linux] Double-click to execute shell script and add it to the dock bar[Python] Use map() function to iterate the parameter list to a function
The use of map()
function in Python is very simple, so simple that it hardly needs any explanation. However, the map()
function is still used in many places, so it is still slightly recorded.
[Python] How to use "datetime" module to process dates
If we want to processing date and time using Python, the datetime module that comes to minds first. The datetime
module encapsulates Python's date-related processing very well, and I have used it a lot in crawlers.