x
小菜菜
当岁月都已失去,偶然与过往相遇,我们还能哼唱出年少的旋律。
小菜菜 @xiaocaicai · 注册于 2026-09-18 · 558 博文 · 0 帖子 · 0 回复
筛选: 分类「Python」 ✕ 清除
python脚本监控家里电视是否开机及开机时常
家里小朋友放学会自己打开电视看,需要控制小朋友看电视时常,写一个脚本来进行监控。 ``` #!/usr/bin/python # -*- coding: UTF-8 -*- import subprocess import time ...
使用python绘制一个A股的历史趋势图
我们拿到的A股历史趋势数据为: ``` 日期 收盘 开盘 高 低 交易量 涨跌幅 2024/2/1 2,735.12 2,773.42 2,804.77 2,666.58 35.29B -1.92% 2024/1/1 2,788.55 2,972.77 2,...
code-server 配合jupyter一直卡在加载中
最近尝试搭建code-server 然后安装了python和jupyter的依赖,发现一直卡在加载中 上面有个加载条一直在转,无法显示。 后面误打误撞发现,直接用ip端口的方式访问code-s...
code-server 通过jupyter打开的项目文件,点击函数定义无法跳转
**解决方法:** 首先确保你已经安装了Python的插件。 点击左下角齿轮设置 -> 搜索 “python.languageServer” ,出来 python.languageServer的设置项目,他现在可能是 Def...
Python保存json到文件中文Unicode乱码解决 ,json.dumps()中文乱码
``` string_result = json.dumps(json_response, ensure_ascii=False) with open(f'result.jsonl', 'w', encoding="utf8") as f: f.write(string_result) ``` 注意两点...
windows安装miniconda
下载安装包:https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe 安装好之后尝试create一个新的env ``` conda create -n demo python=3.9 cond...
python打包成exe可执行程序
PyInstaller是一款非常实用的Python第三方库,它能够将Python脚本打包成独立的可执行文件,使得程序在没有Python环境的计算机上也能够运行。接下来,本文将详细介绍PyIn...
当使用 PyInstaller 打包 PyQt 应用程序时添加静态资源
当使用 PyInstaller 打包 PyQt 应用程序时,默认情况下不会将资源文件(如图像、数据文件等)包含在可执行文件中。这就是为什么您的打包程序无法渲染图像的原因。 为了...
selenium-wire 教程
## 安装 ``` pip install selenium-wire ``` ## 简单例子 ``` from seleniumwire import webdriver driver = webdriver.Chrome() driver.get('https://www.baidu.com/')...
selenium chromedriver 使用selenium-stealth 进行反检测处理
我们正常用seleniumwire抓数据代码: ``` from seleniumwire import webdriver # Import from seleniumwire from selenium.webdriver.chrome.service import Service # ...