首页
Linux
服务部署
Nginx
MySQL
Docker
Jenkins
Python
Golang
前端
javascript
react
其它
传送门
cn2linux
行动起来,活在当下
累计撰写
128
篇文章
累计创建
1
个标签
累计收到
0
条评论
栏目
首页
Linux
服务部署
Nginx
MySQL
Docker
Jenkins
Python
Golang
前端
javascript
react
其它
传送门
目 录
CONTENT
最新文章
草稿:Python函数放在列表
# Functions are first-class citizens in Python: # They can be passed as arguments to other functions, # returned as values from other functions, and
2023-12-16
12
0
0
Python
草稿:Python __repr__ 与 __str__
# When To Use __repr__ vs __str__? # Emulate what the std lib does: >>> import datetime >>> today = datetime.date.today() # Result of __str__ should
2023-12-16
8
0
0
Python
草稿:Python 容器数据类型
# collections.Counter lets you find the most common # elements in an iterable: >>> import collections >>> c = collections.Counter('helloworld') >>>
2023-12-16
19
0
0
Python
草稿: Squid正向代理 (基于MySQL验证)
快速安装相关服务 yum install mariadb-server squid -y yum install perl-DBD-mysql -y 创建配置数据库 启动服务并设置开机自启动: sudo systemctl start mariadb sudo systemctl enable ma
2023-12-16
23
0
0
草稿: JavaScript json转换对象
JSON转换JS对象 let obj = JSON.parse(json_obj)
2023-12-16
10
0
0
草稿:Python 类变量与实例变量
示例信息 class Student: name = "" age = 0 def __init__(self, name, age): self.name = name self.age = age def do_homework
2023-12-16
12
0
0
Python
草稿:Python switch/case 实现
def dispatch_if(operator, x, y): if operator == 'add': return x + y elif operator == 'sub': return x - y elif operator ==
2023-12-16
11
0
0
Python
草稿:Python 函数传入字典
# Python 3.5+ allows passing multiple sets # of keyword arguments ("kwargs") to a # function within a single call, using # the "**" syntax: >>> def p
2023-12-16
10
0
0
Python
草稿:Python 使用内置HTTP服务
Python3的启动方式 python3 -m http.server Python2的启动方式 python -m SimpleHTTPServer 8000 Python内置的http服务会将当前启动的目录设置为根服务器。
2023-12-16
14
0
0
Python
草稿:Python 多行字符串
方法一 s1 = """Multi line strings can be put between triple quotes. It's not ideal when formatting your code though""" print (s1) 输出: Mu
2023-12-16
10
0
0
Python
1
2
3
4
5
...
13