This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import time | |
def type_effect(text, delay=0.05): | |
"""In ra từng ký tự với hiệu ứng gõ chậm.""" | |
for char in text: | |
sys.stdout.write(char) | |
sys.stdout.flush() | |
time.sleep(delay) | |
print() # Xuống dòng sau khi in xong |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Cập nhật và cài gói cần thiết | |
sudo apt update | |
sudo apt install -y curl gpg | |
# 2) Thêm khóa GPG và repo của Microsoft | |
sudo install -d -m 0755 /etc/apt/keyrings | |
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \ | |
| sudo gpg --dearmor -o /etc/apt/keyrings/microsoft.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/code stable main" \ | |
| sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import sys | |
import math | |
def data(text, delay=0.03): | |
""" | |
Hiệu ứng gõ phím từ từ với màu sắc RGB đổi liên tục. | |
""" | |
# ANSI escape codes cho màu RGB | |
def rgb_to_ansi(r, g, b): |