文章列表
先看看Python3.0里面的情况:
首先,创建文件c:\chinese.py,文件编码是utf-8,文件内容如下:
print("中文")
在IDLE里执行:
>>> import sys
>>> sys.path.append("c:\\")
>>> import chinese
中文
一切都很完美!
再试试其它编码,把chinese.py的文件编码改成gbk,再执行上面的操作,结果报错:
Traceback (most recent call last):
File "< ...
1、协作型过滤
对一大群人搜索,从中选择与我们品味相近的一小群人,算法会对这小群人其他内容进行考察,并将他们组合起来构造一个经过排名的推荐列表
2、搜集偏好
recommendations.py
# A dictionary of movie critics and their ratings of a small
# set of movies
critics={'Lisa Rose': {'Lady in the Water': 2.5, 'Snakes on a Plane': 3.5,
'Just My Luck': 3.0, 'Superman Returns': 3.5, ' ...
一、参考资料
1、A good starting point for finding more web sites with open
APIs is ProgrammableWeb
(http://www.programmableweb.com).
2、http://www.oreilly.com/catalog/9780596529321
http://www.oreilly.com
二、生活中的例子
1、goole网页链接排名,有效广告定位
2、搜索引擎和pagerank算法
3、Amazon和Netflix利用人们租赁或购买信息确定人或物品的相似程度 ,再根据买卖历 ...