首页
关于
Search
1
git lg彩色显示日志
28 阅读
2
在 Ubuntu 22.04 LTS 中安装 Docker
19 阅读
3
CentOs/Ubuntu搭建上网x-ui
18 阅读
4
git使用多个源和多个分支
15 阅读
5
清理Windows臃肿程序
15 阅读
默认分类
网站搭建
Windows
Linux
Docker
OpenWrt
Hackintosh
Git
Python
Web开发
JavaScript
FFmpeg
Demo
工具
刷机
油猴脚本
Excel
Chrome Extension
登录
Search
标签搜索
Pandas
读取
时区
Chrome
centos8
求和
Nginx
Typecho
404
csv
国际站
询盘导出
油猴脚本
bbr
Ubuntu
远程桌面
日志
log
数据清洗
打印机
野生程序猿
累计撰写
153
篇文章
累计收到
0
条评论
首页
栏目
默认分类
网站搭建
Windows
Linux
Docker
OpenWrt
Hackintosh
Git
Python
Web开发
JavaScript
FFmpeg
Demo
工具
刷机
油猴脚本
Excel
Chrome Extension
页面
关于
搜索到
153
篇与
的结果
2022-12-06
Selenium操作Chrome
import os,platform,time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver import ChromeOptions sys_platform = platform.platform().lower() if "windows" in sys_platform: binary_location = "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" executable_path = "C:\\chromedriver.exe" user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36' elif "macos" in sys_platform: binary_location = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" executable_path = os.path.expanduser('~') + '/Documents/chromedriver' user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36' defaults = './Profile' option = ChromeOptions() option.binary_location = binary_location option.add_experimental_option('useAutomationExtension', False) option.add_experimental_option("excludeSwitches", ['enable-automation']) option.add_argument('--lang=zh-cn') option.add_argument('--disable-translate') option.add_argument(f'--window-position={100},{100}') option.add_argument(f'--user-data-dir={defaults}') option.add_argument(f'user-agent={user_agent}') option.add_argument('--disable-gpu') option.add_argument('--ignore-certificate-errors') option.add_argument('--ignore-ssl-errors') bro = webdriver.Chrome(executable_path=executable_path,options=option) bro.set_window_size(1024,768) bro.implicitly_wait(8) bro.get('https://www.baidu.com/') time.sleep(5) bro.close() bro.quit()
2022年12月06日
2 阅读
0 评论
0 点赞
2022-11-23
Git初始化命令
简易的命令行入门教程:Git 全局设置:git config --global user.name "xxxx" git config --global user.email "
[email protected]
"创建 git 仓库:mkdir 111 cd 111 git init touch README.md git add README.md git commit -m "first commit" git remote add origin https://gitee.com/xxxx/xxx.git git push -u origin "master"已有仓库?cd existing_git_repo git remote add origin https://gitee.com/xxxx/xxx.git git push -u origin "master"
2022年11月23日
2 阅读
0 评论
0 点赞
2022-10-30
VPS测试脚本合集
流媒体解锁测试脚本bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh)三网回程延迟测试脚本wget -qO- git.io/besttrace | bash三网回程测试脚本curl https://raw.githubusercontent.com/zhucaidan/mtr_trace/main/mtr_trace.sh|bash三网测速脚本bash <(curl -Lso- https://git.io/superspeed_uxh)测速命令wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash
2022年10月30日
1 阅读
0 评论
0 点赞
2022-10-30
使用snapshot_phantomjs保存pyecharts为图片
1.安装python库pip3 install snapshot_phantomjs2.安装phantomjs 官网地址 下载对应操作系统的版本,并复制到系统环境路径下#查看是否安装成功 phantomjs --version3.因网络环境问题报错,File "/root/snapshot-phantomjs_test.py", line 19, in <module> make_snapshot(snapshot, bar_chart().render(), "bar0.png") File "/usr/local/lib/python3.9/site-packages/pyecharts/render/snapshot.py", line 45, in make_snapshot raise OSError(content_array) OSError: ["ReferenceError: Can't find variable: echarts\n\n file:////root/render.html:12 in global code\nReferenceError: Can't find variable: echarts\n\n undefined:1\nnull\n"]则需要下载所需js:wget https://assets.pyecharts.org/assets/echarts.min.js4.测试案例from pyecharts import options as opts from pyecharts.charts import Bar from pyecharts.render import make_snapshot from snapshot_phantomjs import snapshot file_path = "{}/".format(os.path.dirname(os.path.abspath("/root/echarts.min.js"))) def bar_chart() -> Bar: c = ( Bar(init_opts=opts.InitOpts(js_host=file_path)) .add_xaxis(["衬衫", "毛衣", "领带", "裤子", "风衣", "高跟鞋", "袜子"]) .add_yaxis("商家A", [114, 55, 27, 101, 125, 27, 105]) .add_yaxis("商家B", [57, 134, 137, 129, 145, 60, 49]) .reversal_axis() .set_series_opts(label_opts=opts.LabelOpts(position="right")) .set_global_opts(title_opts=opts.TitleOpts(title="Bar-测试渲染图片")) ) return c make_snapshot(snapshot, bar_chart().render(), "bar0.png")
2022年10月30日
1 阅读
0 评论
0 点赞
2022-10-21
Pandas保留小数或取整
1.round(n)方法四舍五入# 全部列 df = df.round(2) # 指定列 df.round({'dogs':2, 'cats':1})2.取整# 指定列 dfs['A'] = dfs['A'].astype('int') # 全部列 dfs = dfs.astype('int')
2022年10月21日
1 阅读
0 评论
0 点赞
1
...
23
24
25
...
31