上一页 1 2 3 4 5 6 7 ··· 9 下一页
摘要: import json, os path = "/don"def list_dir(path, res): for i in os.listdir(path): temp_dir = os.path.join(path, i) if os.path.isdir(temp_dir): temp = { 阅读全文
posted @ 2022-07-27 10:38 人生信条~~ 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-07-19 01:02 人生信条~~ 阅读(33) 评论(0) 推荐(0) 编辑
摘要: include /etc/nginx/conf.d/*.conf; #用于tomcat反向代理,解决nginx 504错误 proxy_connect_timeout 300; #单位秒 proxy_send_timeout 300; #单位秒 proxy_read_timeout 300; #单位 阅读全文
posted @ 2022-07-05 22:21 人生信条~~ 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #获取本机ip地址(云服务器需要手动配置IP地址,需要根据实际环境确认IP是否正确)#IP=$(/sbin/ip addr |grep inet |grep -v inet6 |grep em1|awk '{print $2}' |awk -F "/" '{print $1}')IP=x.x.x.x 阅读全文
posted @ 2022-07-01 22:08 人生信条~~ 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 1. 在CMD里面输入ipython profile create 2.在 ipython_config.py的文件里面开启三个参数 3. c.Completer.use_jedi = True c.Completer.greedy = True c.Completer.jedi_compute_t 阅读全文
posted @ 2022-06-03 19:20 人生信条~~ 阅读(103) 评论(0) 推荐(0) 编辑
摘要: #匿名函数def isodd(x): return x%2a=isodd(10)print(a)isodd = lambda x: x%2#无参数#func= lambda:3,14#func()#print(a)myadd = lambda x,y:x+yA=myadd(1,2)print(A)m 阅读全文
posted @ 2022-05-28 12:26 人生信条~~ 阅读(23) 评论(0) 推荐(0) 编辑
摘要: #!/bin/bashlogApi=(91xingcai xinyao ag ah ascp)for i in ${logApi[*]};do content=`tail -n 100000 /home/logs/nginx/access/${i}Api.log |grep -v 'upstream 阅读全文
posted @ 2022-05-27 17:37 人生信条~~ 阅读(81) 评论(0) 推荐(0) 编辑
摘要: #作用域#匿名函数def isodd(x): return x%2a=isodd(10)print(a)isodd = lambda x: x%2#无参数#func= lambda:3,14#func()#print(a)myadd = lambda x,y:x+yA=myadd(1,2)print 阅读全文
posted @ 2022-05-27 12:23 人生信条~~ 阅读(22) 评论(0) 推荐(0) 编辑
摘要: #csv文件:使用纯文本来存储表格数据 并以分隔符进行分隔#1.导入模块 import csv#2.打开文件 创建csv对象# f=open(fname)# csvf=csv.reader(f)#3.for row in csvf: print(row)#4.关闭文件 f.close()# impo 阅读全文
posted @ 2022-05-25 08:05 人生信条~~ 阅读(191) 评论(0) 推荐(0) 编辑
摘要: #文件读取path=r'D:\Python学习\day1\a.txt'f=open(path,encoding='utf-8')print(f)txt=f.read()print(txt)f.close()#文件写入# path=r'D:\Python学习\day1\a.txt'# f=open(p 阅读全文
posted @ 2022-05-24 02:13 人生信条~~ 阅读(30) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 9 下一页