svm

Posted by 夏泽民



virtualenv

Posted by 夏泽民

在开发Python应用程序的时候,系统安装的Python3只有一个版本:3.4。所有第三方的包都会被pip安装到Python3的site-packages目录下。



pip

Posted by 夏泽民

1、pip下载安装 1.1 pip下载 # wget “https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb” –no-check-certificate # wget “https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb” –no-check-certificate 1.2 pip安装 # tar -xzvf pip-1.5.4.tar.gz # cd pip-1.5.4 # python setup.py install # tar -xzvf pip-1.5.4.tar.gz # cd pip-1.5.4 # python setup.py install

  1. pip使用详解 2.1 pip安装包 # pip install SomePackage […] Successfully installed SomePackage # pip install SomePackage […] Successfully installed SomePackage 2.2 pip查看已安装的包 # pip show –files SomePackage Name: SomePackage Version: 1.0 Location: /my/env/lib/pythonx.x/site-packages Files: ../somepackage/init.py […] # pip show –files SomePackage Name: SomePackage Version: 1.0 Location: /my/env/lib/pythonx.x/site-packages Files: ../somepackage/init.py […] 2.3 pip检查哪些包需要更新 # pip list –outdated SomePackage (Current: 1.0 Latest: 2.0) # pip list –outdated SomePackage (Current: 1.0 Latest: 2.0) 2.4 pip升级包 # pip install –upgrade SomePackage […] Found existing installation: SomePackage 1.0 Uninstalling SomePackage: Successfully uninstalled SomePackage Running setup.py install for SomePackage Successfully installed SomePackage 2.5 pip卸载包 $ pip uninstall SomePackage Uninstalling SomePackage: /my/env/lib/pythonx.x/site-packages/somepackage Proceed (y/n)? y Successfully uninstalled SomePackage
  2. pip参数解释 # pip –help Usage:
    pip [options]


信息熵

Posted by 夏泽民

熵定义如下: 变量的不确定性越大,熵也就越大,把它搞清楚所需要的信息量也就越大。香农不是用钱,而是用 “比特”(bit)这个概念来度量信息量。 信息量的比特数和所有可能情况的对数函数 log 有关。(二进制位数)常用的汉字(一级二级国标)大约有 7000 字。假如每个字等概率,那么我们大约需要 13 个比特(即 13 位二进制数)表示一个汉字。



Zookeeper与Paxos

Posted by 夏泽民

 Zookeeper是一个开源的分布式协调服务,其设计目标是将那些复杂的且容易出错的分布式一致性服务封装起来,构成一个高效可靠的原语集,并以一些列简单的接口提供给用户使用。其是一个典型的分布式数据一致性的解决方案,分布式应用程序可以基于它实现诸如数据发布/发布、负载均衡、命名服务、分布式协调/通知、集群管理、Master选举、分布式锁和分布式队列等功能。其可以保证如下分布式一致性特性。



Search

Popular posts

Anything in here will be replaced on browsers that support the canvas element

Recent posts

This blog is maintained by 夏泽民

Get in touch with me at 465474307@qq.com

Subscribe to our mailing list

* indicates required