sep=''',.?!":''' exclude={'the','and','of','to'} for c in sep: news=news.replace(c,' ') wordList=news.lower().split() wordDict={} wordSet=set(wordList... ...
分类:
其他好文 时间:
2018-03-27 18:46:39
阅读次数:
138
```go package main import ( "io" "log" "net/http" ) type User string func (u User) toString() string { return string(u) } type AuthHandler func(u User ...
分类:
Web程序 时间:
2018-03-27 01:47:05
阅读次数:
217
news = news.lower()newList1 = news.split(" ")dict={}>>> for i in newList1:dict[i]=newList1.count(i) dictList = list(item.items())dictList.sort(key= la ...
分类:
其他好文 时间:
2018-03-26 22:35:56
阅读次数:
185
https://www.oray.com/news/affiche/?aid=628 免费版花生壳服务故障 因免费版机房线路节点负荷突然暴增,导致花生壳免费版登录缓慢或异常,或出现域名指向到127.0.0.2的ip地址,工程师已在排查抢修中,请保持花生壳登录在线或者升级花生壳服务级别。 快速升级通道 ...
分类:
其他好文 时间:
2018-03-26 16:11:28
阅读次数:
190
f = open('news.txt','r') news = f.read() f.close() print(news) sep = '''.,?'!:"''' exclude = {'the','and','of','to','and','he','for'} # 将sep里面的字符替换为空格... ...
分类:
其他好文 时间:
2018-03-26 12:40:13
阅读次数:
145
1 #-*- coding:UTF-8 -*- # -*- author:Duym -*- wordList=news.lower().split() for w in wordList: print(w) the area of green was reducing in the last dec... ...
分类:
其他好文 时间:
2018-03-26 12:31:18
阅读次数:
131
第一页 自己指定,避免和/page/1.html重复thinkphp的分页类,默认第一页为 type/news/page/1.html ,这就与type/news.html内容重复了,挺不适合的然后改造下,修改options 其中增加了firsturl之后在修改url方法 这样使用的时候 >pagi ...
分类:
Web程序 时间:
2018-03-26 00:39:48
阅读次数:
209
当使用中文时会报错: 其解决方法是:在文件前面加入 其实不止在Django,在python文件中开头为了支持中文我们都应该加上 在初学时一直使用,只不过后来慢慢忘了,那时候使用的是: 当然,这两个都是可以使用的 ...
分类:
编程语言 时间:
2018-03-25 01:23:09
阅读次数:
181
以下代码演示function, filter, projection的使用,可结合注释 省略部分代码,省略部分可参考:https://blog.csdn.net/nickta/article/details/79666918 输出: <Sat Mar 24 13:41:42 CST 2018[par ...
分类:
其他好文 时间:
2018-03-24 14:32:49
阅读次数:
177
https://blog.csdn.net/qq_30100043/article/details/53005478 ...
分类:
Web程序 时间:
2018-03-23 18:53:40
阅读次数:
231