![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
Link_tony
这个作者很懒,什么都没留下…
展开
-
Python good use
Nice Codestr.capitalize() 返回str的首字母大写,其他全小写str.title() 将str的所有单词首字母大写,其他全小写str.count(sub, start= 0,end=len(string)) 字符串匹配,返回str中sub的个数str.endswith(suffix[, start[, end]]) suffix是匹配的字符串,如以该字...原创 2018-09-24 16:14:24 · 109 阅读 · 0 评论 -
Python Network Programming
socketsocket.gethostbyname(hostname) socket.gethostbyaddr(addr)socket.getservbyname(name) 查询端口号(如name=’www’, 返回80)socket.getserbyport(80) 返回’www’127...* 是本地ip10...* 172.16-31.. 192.168.....原创 2018-09-14 13:43:05 · 1424 阅读 · 0 评论 -
Python Quant
Numpyarange创建等差数组 np.arange(5,20, step = 2) [ 5 7 9 11 13 15 17 19]reshape重塑import numpy as npb = np.arange(27).reshape(3, 3, 3)[[[ 0 1 2] [ 3 4 5] [ 6 7 8]] [[ 9 10 ...原创 2018-09-14 13:46:00 · 952 阅读 · 0 评论 -
Django+Bootstrap+Mysql 搭个人博客
初始化新建项目#pycharm手动创建django项目或如下$ django-admin.py startproject website#创建Django app$ python manage.py startapp blog更改数据库配置(sqlite->mysql)#/website/setting.pyDATABASES = { 'default': { ...原创 2018-10-08 21:20:59 · 966 阅读 · 0 评论