Ex_treme's blog.

Ex_treme's blog.

do what you love and believe in, and the answer you find will come up naturally

xadmin快速开发后台管理系统
xadmin快速开发数据管理后台 主要流程就是加载xadmin这个app,就像使用其它app一样使用xadmin,它继承了django自带的admin的所有功能,所以开发非常方便。 xadmind源码导入 这里我们使用源码包直接放在工程目录下,而后注册app。 1234567891011121314151617181920setting:sys.path.insert(0,os.path.join(BASE_DIR,'extra_apps'))INSTALLED_APPS = [ 'django.contrib.admin', &a...
pyspider快速部署爬虫前台
Pyspider的self.crwal使用 本文绍一下Pyspider的基本知识和原理 self.crawl(url, **kwargs) 12def on_start(self): self.crawl('http://localhost:8000/gys/0/', callback=self.index_page) url是起始地址,callback一个回调函数解析网页。 age 123@config(age=10 * 24 * 60 * 60)def index_page(self, response): ... age是任务有效期限,...
conda常用命令
Conda常用命令 下载地址 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive 获取版本号 conda -v 创建虚拟环境 conda create --name your_env_name python=2.7 创建时附加包 conda create --name your_env_name python=3.5 numpy sklearn pandas 进入环境 activate your_env_name 退出环境 deactivate 删除环境 conda remov...
阿里云部署实战
阿里云部署全记录 设置默认编译环境 1234sudo su rootupdate-alternatives --install /usr/bin/python python /usr/bin/python2 100update-alternatives --install /usr/bin/python python /usr/bin/python3 150update-alternatives --config python 配置pip环境 123456#update是下载源里面的metadata的. 包括这个源有什么包, 每个包什么版本之类的apt-get update#upg...
django+nginx+uwsgi生产环境配置
生产环境配置 mysql基础配置 123456#修改配置文件$ nano /etc/mysql//mysql.conf.d/mysqld.cnf bind 0.0.0.0#给所有用户赋权GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;FLUSH PRIVILEGES; 依赖包环境配置 12345678910111213141516#导出依赖包pip listpip freeze > requirement...
Elasticsearch的Restful接口的应用
Elasticsearch的Restful接口的应用 请求指定类型的统计信息 $ curl -XGET ‘http://localhost:9200/qa/huawei/_count?pretty’ 请求指定文档信息 $ curl -XGET ‘http://localhost:9200/qa/huawei/c30f512cbee46a242034f31e2dae69df?pretty’ 请求指定类型的所有文档 $ curl -XGET ‘http://localhost:9200/qa/huawei/_search?pretty’ 请求匹配指定字段的文档 ...
elasticsearch查询
elasticsearch的简单查询 查询 elasticsearch是功能非常强大的搜索引擎,使用它的目的就是为了快速的查询需要的数据。 查询分类: 基本查询:使用elasticsearch内置查询条件进行查询 组合查询:把多个查询组合在一起进行复合查询 过滤:查询同时,通过filter条件在不影响打分的情况下筛选数据 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071...
elasticsearch基础
安装elasticsearch 1234$ git clone git://github.com/medcl/elasticsearch-rtf.git -b master --depth 1$ cd elasticsearch-rtf/bin$ ./elasticsearch$ open http://localhost:9200/ head插件和kibana的安装 12345$ git clone git://github.com/mobz/elasticsearch-head.git$ cd elasticsearch-head$ cnpm install(从淘宝镜像仓库下载第...
文章搜索引擎————LDA算法整合
文章搜索引擎(四) 这一章主要是把LDA算法整合进去,非常简单,而后是对前端整体的一个实现和展示。 整合LDA算法 LDA算法实现 1234567891011121314151617181920import jsonimport gensimfrom article.models import ArticleModel# relist 文章id的listdef getTheme(reslist): fencelist = list() for res in reslist: id = res[0] articles = ArticleModel...
pzs741
Ex_treme's blog
FRIENDS
friendA friendB