- 博客(16)
- 收藏
- 关注
转载 hmm lda data requirement
WS a 1 x N vector where WS(k) contains the vocabulary index of the kth word token, and N is the number of word tokens. The word indices are not zero based, i.e., min( WS)=1 and max( WS ) = W = numbe
2015-04-07 16:13:04 917
原创 python page rank
#-*- coding:utf-8 -*-import sysimport reimport numpyas npimport scipy.ioimport mathreload(sys)sys.setdefaultencoding('utf-8')class page_rank(object):
2015-04-07 16:07:17 812
转载 urllib 与 urllib2 区别
urllib and urllib2are both Python modules that do URL request related stuff but offer different functionalities. Their two most significant differences are listed below: urllib 和urllib2都是接受URL请
2015-01-24 08:15:31 569
转载 django mysql phpmyadmin nginx 配置
1. 使用官方PPA安装 Nginx 最新版本,使用以下命令:sudo add-apt-repository ppa:nginx/stablesudo apt-get updatesudo apt-get install nginxNginx相关控制命令:启动 Nginx:sudo /etc/init.d/nginx start浏览器浏览运行情况输入:http://lo
2014-04-25 11:57:25 1074
转载 Highcharts选项配置详细说明文档
Highcharts选项配置详细说明文档Chart:图表区选项Chart图表区选项用于设置图表区相关属性。参数 描述 默认值backgroundColor 设置图表区背景色 #FFFFFFborderWidth 设置图表边框宽度 0borderRadius 设置图表边框圆角角度 5renderTo 图表放置的容器,一般在html中放置一个DIV,
2014-04-24 11:28:39 812
原创 Ubuntu Android开发环境配置
1.sun jdk 1.6安装java运行环境,sun-jdk,安装方式请上网找谷歌,这里使用sun-jdk。请注意,使用1.6版。
2014-04-14 19:23:00 722
翻译 如何在django查看一个group里的所有user
from django.contrib.auth.models import User, Group
2014-04-14 16:33:12 5730
原创 format html floatformat django python
开发python项目时,使用django框架,前台的数值有时需要format, 每3位加逗号之类的。只需要以下两行就搞定{% load humanize %}{{ value|floatformat:1|intcomma }}
2014-04-01 10:22:32 1644
原创 django python html checkbox
当我们在开发网页的时候,如果数据大于10的都不能用下拉选择方式显示, 而要转为多选的方式。这是html页面的checkbox表单{% for item in item_list %}<input name="aaa" type="checkbox" value="{{ item }}" {% for it in item_list %}{% ifequal it item %}
2014-03-31 17:35:47 1443
原创 spf13安装
安装SPF13不用翻墙,代理的方法。不知道为什么装spf13的插件需要写入命令行:sh 装插件失败后,需要用ll查看root主目录下的插件文件,吧配置文件给删除如果外国服务器被封的话,需要用以下办法git clone git://github.com/spf13/spf13-vim.gitcd spf13-vimsh bootstrap.sh
2014-03-30 21:04:00 2390
原创 beautifulsoup 简单使用
直接上码,抓的是安智市场的数据#-*-coding:utf-8-*-from bs4 import BeautifulSoupimport urllibimport reimport xlwti = 1data = xlwt.Workbook()sheet = data.add_sheet(“sheet 1″)row = 0while i path =
2014-03-04 11:20:31 1057
原创 Ubuntu中gvim中文输入法ibus无法使用的问题
用gvim得时候发现ibus无法输入中文,切换到中文输入法时,输入无候选项,会自动把拼音切换到英文解决放法:在输入法的首选项中,把 “在应用程序窗口中启用内嵌编辑模式” 前面的勾去掉。
2014-03-04 11:18:31 1213
原创 python dictionary list
python dictionary 的使用新建空的dictionary :dict = {}建立dict的键值:dict['key'] = 'value'如果key值存在则覆盖,如果key值不存在则添加查找key是否存在用 key in or not in dict如果存在返回 true获取key的所对应的value则用dict['key'] = value
2014-02-12 11:55:47 994
原创 git 使用
现在很多人都用gitlab存放代码,如何将代码clone到本地需要用到命令行 ssh-keygen然后不用输出任何命令,按enter把存放好的在.ssh/id_rsa.pub 用cat命令显示在终端,然后将字段复制到gitlab的ssh_key 中git branch XX : 新建一个分支git branch :查看所在分支git checkout XX :
2014-01-20 20:28:58 817
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人