====================[ LOG SAMPLE ]====================
2025-08-08 15:32:55 [INFO] Server started at http://localhost:8080
2025-08-08 15:33:10 [ERROR] syntax error at line 23
2025-08-08 15:33:12 [WARN] Deprecated API usage
192.168.1.10 GET /index.html 200
8.8.8.8 GET /malicious.php?id=19 404
172.20.0.5 POST /api/data 500
http://example.com?param=1234567890123456789012345678901234567890
#!/usr/bin/env python3 | |
# Yêu cầu: Python3, rich, subprocess, perf | |
import subprocess, sys, os, time, sqlite3 | |
from rich.console import Console | |
from rich.table import Table | |
from rich.panel import Panel | |
from rich.live import Live | |
from rich.prompt import Prompt |
def generate_scylla_yaml(n_cpu, ram_gb, n_nvme, numa_nodes, use_row_cache=True): | |
ram_mb = ram_gb * 1024 | |
memory = int(ram_mb * 0.7) | |
memtable_heap = int(memory * 0.25) | |
row_cache = 8192 if use_row_cache else 0 | |
num_io_queues = n_nvme * numa_nodes | |
compaction_throughput = 256 | |
yaml = f"""\ | |
# Generated ScyllaDB configuration sample |
#!/bin/bash | |
set -e | |
DATA_PATH="${1:-/var/lib/scylla}" | |
echo "=== [1/6] Phát hiện thiết bị chứa dữ liệu ScyllaDB ($DATA_PATH) ===" | |
DEVICE=$(df "$DATA_PATH" | tail -1 | awk '{print $1}' | sed 's/[0-9]*$//') | |
DEVICE_NAME=$(basename "$DEVICE") | |
if [ -z "$DEVICE" ]; then |
The error message NETSDK1209 indicates that your current version of Visual Studio does not support targeting .NET 8.0:
- Update the .csproj file to target a supported version of .NET, such as .NET 7.0.
-
Open the
.csproj
file. -
Find the
<TargetFramework>
element. -
Change the value to
net7.0 or a lower
version.<TargetFramework>net7.0</TargetFramework>
-
#!/bin/bash | |
sudo apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo apt-key fingerprint 0EBFCD88 | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ |
Lỗi TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version' xảy ra khi truyền một tham số không hợp lệ (ssl_version) vào hàm kwargs_from_env() trong thư viện Docker Python.
Docker compose version 1 không hoạt động với Docker SDK for Python 7.0.0+ hiện có trên hệ thống, chỉ hoạt động đến version 6.x.y. Nên có 2 cách giải quyết vấn đề này:
-
Gỡ cài đặt thư viện Docker SDK 7.0.0+ trong hệ thống và cài lại phiên bản < 7.0.0:
pip uninstall docker pip install docker==6.1.3
Lỗi DockerException với thông báo Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked' thường xuất hiện khi có sự không tương thích giữa các phiên bản Docker library và Library HTTP mà Docker sử dụng.
Để khắc phục vấn đề này, có thể thử các bước sau:
- Cập nhật Thư viện Docker:
Đảm bảo rằng sử dụng phiên bản mới nhất của thư viện Docker Python. Có thể cập nhật nó bằng cách chạy:
pip install --upgrade docker
- Cập nhật Thư viện urllib3:
Lỗi này có thể liên quan đến thư viện urllib3 mà thư viện Docker sử dụng để thực hiện các yêu cầu HTTP. Cập nhật urllib3 lên phiên bản mới nhất:
pip install --upgrade urllib3
This worked for me on Ubuntu 24.04:
-
Download libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb on Openssl 1.0
sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb
-
Install Flatpak:
sudo apt install flatpak
sudo apt install gnome-software-plugin-flatpak
To update text data in files according to specific versions of files with the same name in Minio using Python, you can use the Minio Python library to interact with your Minio server. The following steps outline the process:
- Install the Minio Python library:
pip install minio
- Import the necessary libraries and set up your Minio client: