Installing KVM Virtual Machine on Ubuntu 18.04 LTS

Recently, I installed KVM on the latest Ubuntu 18.04 to virtualize a small VM cluster. Here, I document the main process and some issues encountered. Preparation First, you need to check if the CPU supports virtualization. Run the following command to check if there are any virtualization-related terms in the /proc/cpuinfo file. If present, it indicates that the CPU supports virtualization technology. egrep -c '(svm|vmx)' /proc/cpuinfo If the command returns 0, it means the CPU does not support virtualization technology. Additionally, virtualization technology in the motherboard BIOS might not be enabled by default. If not, you need to enable it manually. ...

June 28, 2018 · 4 min · Zhiya

Major Issue! Uninstalling WeGame Solves XPS 15 Blue Screen Problem

Incubation Period At the end of April last year, I bought a US version of the XPS 15 9560. After using it for a few months, it occasionally started to blue screen. I had seen many complaints about XPS quality control on forums before, so I thought I was just unlucky. Fortunately, the blue screens were infrequent and didn’t affect usage, so I didn’t pay much attention. Escalation Period This May, after upgrading to Win10 1803 (I usually upgrade software immediately to experience the latest improvements), the blue screens became more frequent and started affecting usage. So, I began investigating the problem. ...

June 20, 2018 · 3 min · Zhiya

The Evolution of Python String Formatting You Didn't Know

String formatting is a fundamental and frequently used feature in every programming language. Those learning Python are likely familiar with using the % syntax for string formatting. However, to make this common feature more convenient, the language itself has iterated on string formatting methods. Before Python 2.6: % Operator Before Python 2.6, there was only one method for string formatting: the % (also known as the modulo) operator. The % operator supports both unicode and str types of Python strings, similar to the sprintf() method in C. Here’s an example of using % to format a string: ...

June 11, 2018 · 4 min · Zhiya

Essential for Beginners | Python Cheat Sheet Chinese Version

I have compiled a quick reference sheet for Python3’s built-in methods, which includes: Built-in methods List processing methods Dictionary processing methods Tuple processing methods Set processing methods Slicing methods for sequence types A total of over 100 methods. Click on the image—view original—download.

May 31, 2018 · 1 min · Zhiya

A Brief Analysis of Four Types of Queues in Python

A queue is a linear data structure that only allows insertion operations at one end and deletion operations at the other end. Searching for “queue” in the Python documentation reveals that the Python standard library includes four types of queues: queue.Queue, asyncio.Queue, multiprocessing.Queue, and collections.deque. collections.deque Deque is short for double-ended queue. Since both ends can be edited, deque can be used to implement both stacks and queues. Deque supports a rich set of operations, with the main methods illustrated below: ...

May 22, 2018 · 4 min · Zhiya