摘要: import os import urllib.request image_url = 'http://img.jingtuitui.com/759fa20190115144450401.jpg' file_path = 'C:/python-pro/mall_splier' # file_name 阅读全文
posted @ 2019-01-16 01:15 Python爱好者666 阅读(9128) 评论(0) 推荐(0) 编辑
摘要: 一、爬虫 1、概述 网络爬虫,搜索引擎就是爬虫的应用者。 2、爬虫分类 (1)通用爬虫,常见就是搜索引擎,无差别的收集数据,存储,提取关键字,构建索引库,给用户提供搜索接口。 爬取一般流程: 初始化一批URL,将这些url放入到等待爬取队列。 从队列取出这些url,通过dns解析ip,对应ip站点下 阅读全文
posted @ 2018-11-13 11:32 Python爱好者666 阅读(414) 评论(0) 推荐(0) 编辑
摘要: 二、欧几里得距离 几个数据集之间的相似度一般是基于每对对象间的距离计算,最常用的是欧几里德距离: #-*-coding:utf-8 -*-#计算欧几里德距离:def euclidean(p,q):#如果两数据集数目不同,计算两者之间都对应有的数same = 0for i in p: if i in 阅读全文
posted @ 2018-11-13 11:28 Python爱好者666 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 单例模式: 装饰器形式: ```import functools def singleton(cls): instance = None @functools.wraps(cls) def getinstance(*args,**kwargs): nonlocal instance if not i 阅读全文
posted @ 2018-11-13 11:26 Python爱好者666 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1、redis基本使用,常用命令 https://redis.io/download ## 安装 Download, extract and compile Redis with: ```$ wget http://download.redis.io/releases/redis-4.0.11.ta 阅读全文
posted @ 2018-11-13 11:23 Python爱好者666 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 安装:pip install celery pip install eventlet 需要提前安装redis。 (Download, extract and compile Redis with: $ wget http://download.redis.io/releases/redis-4.0. 阅读全文
posted @ 2018-11-13 11:22 Python爱好者666 阅读(646) 评论(1) 推荐(0) 编辑
摘要: Go语言 一、特点 1、函数式编程 闭包 2、工程化 资源管理,错误处理,测试文档, 3、并发编程 goroutine和channel 调度器。 4、接口编程, interface 5、全新的静态类型开发语言 6、更丰富的内置类型slice 7、错误处理: defer, panic和recover 阅读全文
posted @ 2018-11-13 11:20 Python爱好者666 阅读(1041) 评论(0) 推荐(0) 编辑
摘要: Python中sendgrid库使用 #帮助文档https://github.com/sendgrid/sendgrid-python https://sendgrid.com/docs/ui/account-and-settings/ https://sendgrid.api-docs.io/v3 阅读全文
posted @ 2018-11-13 10:51 Python爱好者666 阅读(1028) 评论(0) 推荐(0) 编辑
摘要: python-django-jet库的使用 1、安装 pip install django-jet 2、配置 将'jet'应用添加到你的Django项目的设置文件settings.py中的INSTALLED_APPS设置中(注意'jet'应位于'django.contrib.admin'之前 确认在 阅读全文
posted @ 2018-11-13 10:43 Python爱好者666 阅读(738) 评论(0) 推荐(0) 编辑
摘要: 因为,本身电脑已经安装odoo8,9,10等odoo的版本,当时,没有考虑是直接是统一的环境很配置。 现在,在odoo11的环境下,需要Python 3的语言环境可以很好地支持odoo11的功能,所以在网上查到了现在比较火的创建虚拟环境的安装工具 pipenv,用它可以很好地隔离各个项目环境,为每一 阅读全文
posted @ 2018-11-13 10:36 Python爱好者666 阅读(1523) 评论(0) 推荐(0) 编辑