单爆手

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页

2019年7月24日

摘要: 在py3中只有两种数据类型:str bytes str: 存unicode(万国码)编码--全球通用的 bytes:存的是16进制的 1.str s='ehllo 丽庆' 》它存在内存中存都是unicode的编码 2.bytes(010101010计算机认识的) 存在磁盘,网络传输等都是bytes类 阅读全文
posted @ 2019-07-24 20:00 单爆手 阅读(142) 评论(0) 推荐(0)

摘要: 类似于cmd的功能,client执行命令,server发命令结果发送到client server.py 阅读全文
posted @ 2019-07-24 17:40 单爆手 阅读(1834) 评论(0) 推荐(0)

2019年7月17日

摘要: 参考:https://www.cnblogs.com/yuanchenqi/articles/5732581.html 一 (简单应用) import logging logging.debug('debug message') logging.info('info message') loggin 阅读全文
posted @ 2019-07-17 22:33 单爆手 阅读(146) 评论(0) 推荐(0)

2019年7月16日

摘要: import timedef show_time(f): def inner(*x,**y): #形参 start=time.time() f(*x,**y) #这里也得传参,因为它去执行add函数 end=time.time() print('spend %s' %(end-start)) ret 阅读全文
posted @ 2019-07-16 11:18 单爆手 阅读(568) 评论(0) 推荐(0)

摘要: 现在有一个新的需求,希望可以记录下函数的执行时间,于是在代码中添加日志代码: import time def foo(): start_time=time.time() print('hello foo') time.sleep(3) end_time=time.time() print('spen 阅读全文
posted @ 2019-07-16 08:22 单爆手 阅读(353) 评论(0) 推荐(0)

2019年7月15日

摘要: 实现的效果如下: 参考www.cnblogs.com/yuanchenqi/articles/5828233.html f(5)=5*4*3*2*1=120 f(7)=7*6*5*4*3*2*1=5040 开始: def fat(n): ret=1 for i in range(1,n+1): re 阅读全文
posted @ 2019-07-15 17:07 单爆手 阅读(10870) 评论(0) 推荐(0)

2019年6月26日

摘要: sudo是linux系统中,用来执行需要权限命令,但是一些朋友使用sudo时,出现下面的错误“ziheng is not in the sudoers file. This incident will be reported.”其中ziheng是登录的用户名。 中文意思是:用户不在sudoers文件 阅读全文
posted @ 2019-06-26 16:57 单爆手 阅读(988) 评论(0) 推荐(0)

2019年6月25日

摘要: 1 使用SecureCRT远程连接后,Options > Session Options > Terminal(终端) > 勾选 “Send protocol NO-OP” 阅读全文
posted @ 2019-06-25 21:00 单爆手 阅读(1085) 评论(0) 推荐(0)

2019年6月4日

摘要: [root@test_environment src]# netstat -tnllup 能显示对应端口和进程 Active Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address St 阅读全文
posted @ 2019-06-04 14:24 单爆手 阅读(5319) 评论(0) 推荐(0)

2019年5月7日

摘要: (1)[root@tf ~]# alias rm='echo do not use rm command'[root@tf ~]# vim /etc/profile alias rm='echo do not use rm command'[root@tf ~]# source /etc/profi 阅读全文
posted @ 2019-05-07 08:34 单爆手 阅读(2812) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
点击右上角即可分享
微信分享提示