Python Style Guide
Python Code Style GuideTable of Contents General Principles Code Layout Naming Conventions Comments & Documentation Functions & Classes Imports Error Handling Best Practices General Principles Readability counts: Code is read more often than it’s written Consistency is key: Follow established patterns within the codebase Explicit is better than implicit: Make your intentions clear Simple is better than complex: Favor straightforward solutions Code LayoutIndentation Use 4 spaces per...
Docker: 银河麒麟操作系统 v10 中离线安装
银河麒麟操作系统 v10 中离线安装 Docker1. 查看系统版本12345678[root@localhost opt]# cat /etc/os-releaseNAME="Kylin Linux Advanced Server"VERSION="V10 (Lance)"ID="kylin"VERSION_ID="V10"PRETTY_NAME="Kylin Linux Advanced Server V10 (Lance)"ANSI_COLOR="0;31"[root@localhost opt]# 2. 查看Linux内核版本12345[root@localhost opt]# uname -r4.19.90-52.22.v2207.ky10.aarch64[root@localhost opt]# uname -aLinux localhost.localdomain 4.19.90-52.22.v2207.ky10.aarch64 #1 SMP...
JS中的正则表达式
JavaScript中的正则表达式常见形式1. 基本形式1/hello/ 2. 常见参数12345678// 忽略大小写/hello/i// 全局匹配/hello/g// 匹配任意字符/[+-\s]/ 2. 匹配数字: 指数表达式匹配1234567/[0-9]e[0-9]/// 匹配1次到多次/[0-9]+e[0-9]+/// 数字匹配简写形式, shorthands/\d+e\d+/ 3. 其他: TODO
English-250509
单词 词性 解释 例句 curriculum n 课程 respectively adverb(副词) 分别 副词定义:通常交代时间,地点,原因,程度等非核心信息 repetition n 重复 build out 建造 dedicated adjective 投入的,致力于 primitive adj, n 原始的 assign n, v 分配 Assign it an empty object dot n, v 点 make with a small spot or spots notation n 符号 He noticed the notations in the margin bracket n, v 括号 dive n, v 潜水 dive deep: 深入探究 comma n 逗号 object properties are separated by comma consolidate v 巩固 Now you can consolidate some of your...
English-250508
单词 词性 解释 例句 cabinet n 衣柜 What’s the cabinet above the fridge for? fridge n 电冰箱 What’s the cabinet above the fridge for? foundation n 基础, 本职 Sharing things I’m learning through my foundation work and other interests| manufactures n, v 制作,制成品 spacex designs、 manufactures and launches the word’s most advaced rockets and spacecraft pyramid n 金字塔
English:句子成分
句子成分 含义 例句 备注 主语 句子中的 主语 就相当于是主角 the man 谓语 主语发出的动作 the man holds 宾语 主语发出动作的承受者/作用对象 the man holds a girl 定语 句子中修饰主语的,称为定语 the handsome man with a bell holds a girl 帅气,带着铃铛,修饰主语,是定语 状语 作修饰,说明地点,时间,原因,结果,条件,方式,方向,程度等 the handsome man with a bell holds a gril on the boat at dusk on the boat:标示地点, at dusk:标示时间 补语 对句子进行补充,使其意义完整 She let him alone 宾语补足语。 补语 分为 主语补足语 和 宾语补足语 。主语 的 补语,就是放在 主语 后面的 补足语 ,像我们常说的 表语 ,也是 主语的补语 表语 也称为主语的补语,表示主语的状态 the other man is a...
English:250507
单词 词性 解释 例句 evaluate verb 评估、执行 evaluate script on the page. shorthands n 速记、简写 Pyppeteer also has shorthands for these methods catch up n 赶上 catch up development of puppeteer credits n 致谢 shortcut n 捷径、近路、快捷方式 This function is a shortcut to Launcher deprecated verb 已弃用 bundle verb 捆绑 Pyppeteer can also be used to control the Chrome browser, but it works best with the version of Chromium it is bundled with incognito adj、adv、n 隐身、匿名 Create a new incognito browser...
wireshark入门
一、 过滤器操作过滤器是Wireshark的核心功能,也是我们平时使用最多的一个功能。 Wireshark提供了两个过滤器:抓包过滤器 和 显示过滤器。两个过滤器的过滤思路不同。 抓包过滤器:重点在动作,需要的包我才抓,不需要的我就不抓。 显示过滤器:重点在数据的展示,包已经抓了,只是不显示出来。 1. 抓包过滤器抓包过滤器在抓包前使用,它的过滤有一个基本的语法格式:BPF语法格式。 1)BPF语法BPF(全称 Berkeley Packet Filter),中文叫伯克利封包过滤器,它有四个核心元素:类型、方向、协议 和 逻辑运算符。 类型Type:主机(host)、网段(net)、端口(port) 方向Dir:源地址(src)、目标地址(dst) 协议Proto:各种网络协议,比如:tcp、udp、http 逻辑运算符:与( && )、或( || )、非( !) 四个元素可以自由组合,比如: src host 192.168.31.1:抓取源IP为 192.168.31.1 的数据包 tcp || udp:抓取 TCP 或者 UDP...
正向代理VS反向代理
🛰️ 正向代理 vs 反向代理(通俗理解)📌 概念对比表 项目 正向代理 反向代理 谁发起使用? 客户端(用户自己配置) 服务端(自动代理到后端) 被隐藏的是谁? 客户端 后端服务器 应用场景 科学上网、绕过墙 负载均衡、隐藏真实后端 示例 VPN、HTTP代理 Nginx、Apache 反向代理 用户访问的是什么 代理服务器 代理服务器 代理服务器转发给 目标网站 实际后端服务(如 Flask) 🎯 正向代理(Forward Proxy) 帮你访问你访问不到的网站 sequenceDiagram participant 用户 participant 代理服务器 participant 谷歌 用户->>代理服务器: 我要访问 Google 代理服务器->>谷歌: 用户请求(代发) 谷歌-->>代理服务器: 响应内容 代理服务器-->>用户: 返回数据 🔍 特点 客户端配置代理 代理“伪装”你去访问外部 被服务端看到的是“代理”,不是你 🛠...
开源许可证详解
下面我来用通俗易懂的方式为你详细介绍主流的开源许可证,包括它们分别允许你干什么(✅ 权利)和限制你干什么(⚠️ 义务/限制)。这对你未来使用或开源项目非常重要。 🧭 总览:开源许可证怎么选?不同的许可证,在“能不能闭源”、“要不要公开修改”、“能不能商用”这些点上差异最大。 许可证 商业可用 闭源可用 修改后是否必须开源 适合谁 MIT ✅ ✅ ❌ 不强制 开发者、初创 Apache 2.0 ✅ ✅ ❌ 不强制 企业、平台级 BSD 3-Clause ✅ ✅ ❌ 不强制 教学、研究 GPL v3 ✅ ❌ ✅ 强制 注重自由的开源社区 LGPL v3 ✅ ✅(限度) ✅ (库级别) 做库的人 MPL 2.0 ✅ ✅ ✅(文件级) 平衡自由和开源 🎯 1. MIT License(最宽松)✅ 权利: 可以免费使用、复制、修改、分发; 可以闭源使用(你修改了也不需要开源); 可以用于商业用途。 ⚠️ 义务: 保留原作者的许可证和版权声明; 没有担保,出错作者不负责。 ✅ 适合: 快速开发、创业、发库、个人项目。📌...