[Python]代码 import subprocess import re keydic = {"MemTotal":"总内存(单…
学习python就一直想做爬虫的东西,还要继续学 理论上的东西一要加强 #!/usr…
一个中文utf8编码后是占3个字符,所以求长度的函数可以这样写 def str_len(str): try: row_l=len(str) utf8_l=len(str.encod…
template html(模板文件): <form enctype=”multipart/form-data” method=”POST…
利用model中的save方法,变相的实现递归循环,所有子分类都能在其中更新,感觉挺巧妙,之前的实现方式确实太烂了。 order的方法竟然支持1:23:2…
转自:https://django-chinese-docs-14.readthedocs.org/en/latest/topics/email.html#django.core.…
1 C:test [dir] getpath [file] path.py …
上班时间通过浏览器打开股票网站怕会被别人看到,没关系,试试在命令行下执行代码看数据就行了。输入sh,就可以查看到上证指数输入sz,就可以查看深圳指数输入cyb,就可以查看创业板指数…
抓取超级课程表话题数据。博文:http://my.oschina.net/jhao104/blog/606922 #!/usr/local/bin/python2.7 # -*- …
现在在做一个简单的搜索引擎,使用今日头条的新闻数据作为数据源。这些数据都是非结构性的,比较适合用 MongoDB 来进行存储。 以下为简单使用的示例。 #!/usr/bin/pyt…
#!/usr/bin/env python3 # -*- coding: utf-8 -*- r''' learning.py A Python 3 tutorial from h…
#!/usr/bin/env python # encoding:utf-8 from socket import * from ctypes import create_stri…