本文主要介绍从FP-tree中提取频繁项集的算法。
更多请见:FP-Growth算法的介绍、FP_Growth算法python实现、FP-Growth算法python实现之 FP-tree的构造。
tree_miner.py代码:#coding=utf-8import tree_builder
import copyclass Tree_miner(object):
"""tree_mi...
分类:
编程语言 时间:
2015-07-04 09:42:12
阅读次数:
257
使用python读取dbf
# -*- coding: utf-8 -*-
import struct,csv,datetime
class DBF_Operator():
@staticmethod
def SHHQ_dbf_reader(f):
numrec, lenheader = struct.unpack('<xxxxLH22x', f.read(32))...
分类:
数据库 时间:
2015-07-04 00:53:06
阅读次数:
165
eopl 第五、六两章谈的就是这个问题。我写了一个 python 版本的程序,先挖个坑,然后等彻底看完再补上。 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 4 # the cps version 5 def s(n, f): 6 ...
分类:
其他好文 时间:
2015-07-03 23:27:49
阅读次数:
185
平时coding时,经常遇到一些乱码问题,现在总结一下在使用Servlet时遇到的一些乱码问题,简单的解决办法两种
第一种简单处理方式
在servlet中数据的处理是通过request和response进行处理的,提交数据有两种方式:post+get
①post提交方式--只要事先设置request.setCharacterEncoding("UTF-8");------...
分类:
其他好文 时间:
2015-07-03 19:20:22
阅读次数:
248
用户HTTP协议交互的信息被称为HTTP报文 简单的请求报文和响应报文实例 HTTP传输过程中常用设置 提升传输速率 编码压缩传输 (常见压缩格式:gzip compress deflate ) 分块传输编码 (Chunked Transfer Coding) 传输多种数据 (图片或文本文件上传) ...
分类:
Web程序 时间:
2015-07-03 18:48:19
阅读次数:
216
新建数据元素:ZDLSSX 参考数据域:ZDLSSX有了这个两个,就可以去定义权限字段了SU21新建权限对象:ZSD_RC_PL新建:权限字段:ZAUTH001这个时候要去域ZLSSX中,将所有用到的按钮名称,加入到域中,作为KEY以上准备工作做完后,开始CODING.在程序开头定义全局字段:DAT...
分类:
其他好文 时间:
2015-07-03 18:42:49
阅读次数:
120
#!?/usr/bin/env?python
#coding:utf-8
#通过paramiko模块,获得远程机器的指定进程相关信息;
?
?
import?paramiko
?
host_lists=(
????????????(‘node1‘,‘172.16.41.151‘),
????????...
分类:
系统相关 时间:
2015-07-03 10:45:26
阅读次数:
183
#coding=utf-8#!/usr/bin/pythondef setConfig(): hello = 'world'; print 'The value has been setted.'; return hello; hello_cp = setConfig();p...
分类:
编程语言 时间:
2015-07-03 00:06:51
阅读次数:
165
#coding=utf-8#!/usr/bin/pythona = 'abc';print isinstance(a, str);
分类:
编程语言 时间:
2015-07-03 00:02:05
阅读次数:
207
select#coding=utf-8#!/usr/bin/pythonimport cx_Oracle;conn = None;cursor = None;try: conn = cx_Oracle.connect('username/password@xxx.xxx.xxx.xxx/sid...
分类:
数据库 时间:
2015-07-02 23:58:00
阅读次数:
231