background picture of the home page

潮生梦界

这次我们会从讨厌的生活里成功逃掉的

Python内存压力测试小工具

工具简介 这个Python脚本实现了一个有趣的内存压力测试工具,通过可控的内存分配机制帮助开发者: 测试程序的内存承载能力 直观观察内存分配过程 验证系统的内存管理机制 def eat_memory(target_mb): # 使用字节串(b'0')作为最小存储单元(1字节) chu

thumbnail of the cover of the post

Ubuntu24.04版本安装docker

一、准备工作 1. 更新系统 sudo apt update && sudo apt upgrade -y 2. 安装依赖工具 sudo apt install -y ca-certificates curl gnupg apt-transport-https software-propertie

thumbnail of the cover of the post

小球逃脱

编写目标 使用pygame仿照B站上经常可以刷到的小球能否在规定时间内逃脱 环境设置与窗口初始化 安装pygame pip install pygame 导入必要的模块并初始化 Pygame 导入模块 导入

thumbnail of the cover of the post

使用 Pygame 和 Stable Baselines3 构建自定义 Gym 环境与智能体

在本篇博客中,我们将一步一步地构建一个使用 Pygame 作为渲染引擎的自定义 Gym 环境,并使用 Stable Baselines3 的 PPO 算法训练一个智能体。整个过程将涵盖环境的创建、智能体的定义、训练过程以及评估。让我们从最基础的窗口构建开始,逐步深入到完整的代码实现。 环境准备 确保

thumbnail of the cover of the post

一些算法题目

合并两个有序数组 问题 将两个非递减顺序排列的整数数组 nums1(有效长度 m)和 nums2(长度 n)合并,结果存储在 nums1 中并保持非递减顺序。nums1 总长度为 m+n,后 n 位初始为无效值。 代码 class Solution { public: void merge(

thumbnail of the cover of the post