Skip to content

Instantly share code, notes, and snippets.

View vvanglro's full-sized avatar
💤

vvanglro vvanglro

💤
View GitHub Profile
import base64
# 原始数据
data = "wd98"
# 使用标准 Base64 字符集对数据进行编码
encoded_data = base64.b64encode(data.encode()).decode()
print(f"Base64 Encoded Data: {encoded_data}")
# 标准和自定义 Base64 字符集
import base64
import random
import string
chars = string.ascii_letters + string.digits
def base64_encode(data):
encoded_bytes = base64.b64encode(data.encode("utf-8"))
return encoded_bytes.decode("utf-8")
import base64
from io import BytesIO
from random import choice, randint, uniform
from PIL import Image, ImageDraw, ImageFont
def random_color(start: int, end: int):
red = randint(start, end)
green = randint(start, end)