import jieba from nltk import * from wordcloud import WordCloud import matplotlib.pyplot as plt words = [] with open('对共享单车的看法.txt', 'r') as f: for line in f.readlines(): seg_list = jieba.cut(line, cut_all=False) for w in seg_list: words.append(w) f.…
用Python编写一个简单的Http Server Python内置了支持HTTP协议的模块,我们可以用来开发单机版功能较少的Web服务器.Python支持该功能的实现模块是BaseFTTPServer, 我们只需要在项目中引入就可以了: from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer 1 Hello world ! Let’s start with the first basic example. It just ret…