- 博客(11)
- 资源 (2)
- 收藏
- 关注
原创 Chapter 9 Dictionaries Assignment 9.4
name = raw_input("Enter file:")if len(name) fh=open(name)counts =dict()ww=list()for line in fh: line=line.rstrip() if not line.startswith('From '):continue w=line.split()
2016-04-25 21:27:09 2089
原创 Using Database with Python -Basic Structured Query Language-Email Database Demo
import sqlite3conn = sqlite3.connect('emaildb.sqlite')cur = conn.cursor()cur.execute('''DROP TABLE IF EXISTS Counts''')cur.execute('''CREATE TABLE Counts (org TEXT, count INTEG
2016-04-24 20:00:42 341
原创 mysql 查询,切换数据库
mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || villa |+--------------------+2 rows in set (0.00 sec)
2016-04-19 22:10:43 2462
原创 python Django 同步mysql数据库
python Django 同步mysql数据库时未生成 models.py中的表python manage.py syncdb 注意:Django 1.7.1及以上的版本需要用以下命令python manage.py makemigrationspython manage.py migrate
2016-04-19 22:06:13 804
原创 Coursera Chaptereight:Lists Assignment 8.4
8.4 Open the file romeo.txt and read it line by line. For each line, split the line into a list of words using thesplit() method. The program should build a list of words. For each word on each li
2016-04-18 14:42:50 1592
原创 Coursera Chaptereight:Lists Assignment 8.5
8.5 Open the file mbox-short.txt and read it line by line. When you find a line that starts with 'From ' like the following line:From [email protected] Sat Jan 5 09:14:16 2008You wi
2016-04-18 14:40:32 6034
原创 Python for Everybody-Using Python to Access Web DatExtracting Data With Regular Expressions
coursera 公开课 python 使用Python访问网络数据 Python for Everybody-Using Python to Access Web DatExtracting Data With Regular Expressions
2016-04-18 14:36:39 1392
转载 Django教程03 模型(model)
晓林网 自建博客学习问题及解决办法 红字数据库设置做网站就不能离开数据库,除非你是做静态网站。django中可以很方便的跟数据库打交道。我们常见的数据库有mysql, oracle, postgresql, django自带的sqllite , 还有NOSQL类型的mongodb,在这里我们使用的是mysql安装mysql1s
2016-04-17 11:45:30 426
转载 Linux mysql 安装 2
hadoop@master:~$ sudo apt-get install mysql-server 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 将会安装下列额外的软件包: libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libterm-r
2016-04-17 10:40:39 290
原创 贝叶斯网络的BDe BIC评分
BDe评分缺点:随着样本个数的增加,可以学习到更多的正确边,模型结构更接近于实际结构。由于先验分布被假设为均匀分布,和实际先验分布差别较大,故通过结构学习得到的结构与实际结构差别较大,不能学习到较优的结构。
2016-04-17 10:33:18 5077 1
转载 Linux mysql安装 1
当遇到下面错误:huangcd@huangcd-ubuntu:~$ sudo apt-get install mysql-server mysql-client正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是因为系统无法达到您要求的状态造成
2016-04-17 10:19:33 262
正交匹配追踪 omp
2014-11-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人