![](https://img-blog.csdnimg.cn/20190918140037908.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Python
Python
黑虎含珠
这个作者很懒,什么都没留下…
展开
-
Python Virtualenv Anaconda
Python Virtualenv Anaconda 多版本 多环境原创 2017-03-28 17:35:11 · 1358 阅读 · 0 评论 -
windows10 python3.5 opencv3
由于工作需要,需要用到opencv和tensorflow,而tensorflow目前所依赖的python版本是3.5,所以本文介绍python3.5环境下opencv3的安装。 安装Numpy 下载numpy http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy pip install numpy-1.12.1+mkl-cp35-原创 2017-06-05 17:29:23 · 2321 阅读 · 0 评论 -
windows10 python2.7 opencv3
本人的操作系统是windows 10 64位,已安装Anaconda。 通过conda创建环境 conda create --name opencv python=2.7 activate opencv pip install numpy pip install matplotlib 从OpenCV网站下载windows版本安装包 https://so原创 2017-06-05 16:21:09 · 1360 阅读 · 0 评论 -
Instagram 在 PyCon 2017 的演讲摘要
图:Instagram Loves Python PyCon 简介 PyCon 是全世界最大的以 Python 编程语言 为主题的技术大会。大会由 Python 社区组织,每年举办一次。在大会上,来自世界各地的 Python 用户与核心开发者齐聚一堂,共同分享 Python 世界的新鲜事、Python 语言的应用案例、使用技巧等等内容。 Instagram 简介转载 2017-06-03 14:06:58 · 974 阅读 · 0 评论 -
Python lambda表达式
语法 lambda 参数列表 : 表达式 fun = lambda x : x*2 fun(2) output: 4原创 2017-06-20 07:13:58 · 369 阅读 · 0 评论 -
Python机器学习Numpy, Scipy, Pandas, Scikit-learn, Matplotlib, Keras, NN速查手册
Numpy SciPy Scikit-Learn Pandas Keras Matplotlib Neural Network Zoo 图片来源 http://www.asimovinstitute.org/neural-network-zoo/ http://blog.csdn.net/baihuaxiu123/a原创 2017-06-02 10:57:40 · 3359 阅读 · 0 评论 -
机器学习之线性回归 (Python SKLearn)
import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties font = FontProperties(fname=r"c:\windows\fonts\msyh.ttc", size=10) #解决中文乱码问题 d原创 2017-05-04 15:14:46 · 2745 阅读 · 0 评论 -
Windows安装梯度提升开发库LightGBM
编译LightGBM git clone https://github.com/Microsoft/LightGBM cd LightGBM mkdir build cd build cmake -DCMAKE_GENERATOR_PLATFORM=x64 .. cmake --build . --target ALL_BUILD --config release 安装Pyt原创 2017-06-02 14:35:12 · 828 阅读 · 0 评论 -
windows安装XGBoost
本文介绍两种安装方式 1.pip方式 从网站下载安装包 http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy pip install numpy-1.12.1+mkl-cp35-cp35m-win_amd64.whl http://www.lfd.uci.edu/~gohlke/pythonlibs/#xgboost pip原创 2017-06-01 16:13:48 · 1034 阅读 · 0 评论 -
Python列表推导式
x = [1, 2, 3] y = [i*2 for i in x] print(y) n1 = [1, 2, 3] n2 = [4, 5, 6] result = [i*j for i in n1 for j in n2] print(result) 输出 [2, 4, 6] [4, 5, 6, 8, 10, 12, 12, 15, 18]原创 2017-05-28 17:43:11 · 452 阅读 · 0 评论 -
2017年最流行的15个数据科学Python库
选自Medium 作者:Igor Bobriakov 机器之心编译 参与:朱朝阳、吴攀 Python 近几年在数据科学行业获得了人们的极大青睐,各种资源也层出不穷。数据科学解决方案公司 ActiveWizards 近日根据他们自己的应用开发经验,总结了数据科学家和工程师将在 2017 年最常使用的 Python 库。 核心库转载 2017-05-18 10:29:18 · 1362 阅读 · 0 评论 -
Python异步编程Async/Await
python 从3.5开始从语言层面提供了新的异步编程语法。 import asyncio async def hello(): print("hello the world") r = await asyncio.sleep(1) print("hello again") def main(): loop = asyncio.get_event_loo原创 2017-03-07 10:23:04 · 4940 阅读 · 0 评论 -
Python的包管理工具
python在发展过程中出现了很多种不同的包管理工具和包格式。画了个思维导图整理了一下基本信息。目前官方推荐使用pip和wheel格式。原创 2017-02-17 14:16:05 · 369 阅读 · 0 评论 -
numpy的基本使用
import numpy as np #创建一维数组arr1 arr1 = np.arange(1, 5, 1) print(arr1) print(arr1.shape) #创建一维数组arr2 arr2 = np.array([1, 1, 1, 1]) print(arr2) #数组相加 arr3 = arr1 + arr2 print(arr3) #更改数组维度 arr1.shape原创 2017-05-03 16:39:45 · 726 阅读 · 0 评论 -
Pandas的基本使用
import numpy as np import pandas as pd #首先创建索引 dates = ['2017-01-01', '2017-02-1', '2017-03-01', '2017-04-01', '2017-05', '2017-06-01'] dates = pd.to_datetime(dates) print(dates)DatetimeIndex(['2017-原创 2017-05-03 17:12:58 · 531 阅读 · 0 评论 -
python使用matplotlib绘制k线图
# -*- coding:utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib.dates import DateFormatter, WeekdayLocator, DayLocator, MONDAY from matplotlib.finance i原创 2017-05-04 10:31:11 · 9016 阅读 · 2 评论 -
windows平台python安装SciPy
SciPy需要BLAS。直接通过pip安装SciPy会报错。 可以通过以下方法解决,当然也可以直接用Anaconda,省得折腾环境了。 从以下网站下载wheel包。 http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy 然后进行本地原创 2017-05-04 13:16:34 · 813 阅读 · 0 评论 -
量化金融第一步获取市场数据 (Python Tushare)
以前开发行情系统,没有历史行情数据只能装个通达信或者大智慧客户端再导出历史数据,然后解析数据格式入库。 现在搞行情方便多了,写个爬虫可以从雅虎财经,腾讯财经,新浪财经抓取数据,这些网站一般都提供有OpenAPI接口。 下面介绍一种更简单的获取数据的方法。 安装tushare tushare依赖于numpy, pandas, lxml, requests, 确保已经安装成功。接下来安装tus原创 2017-05-04 18:15:33 · 12819 阅读 · 1 评论 -
Python线程、进程、进程池、协程
Python线程,切记Python的GIL特性 import threading def func(): print(threading.current_thread().getName()) pass class MyThread(threading.Thread): def run(self): print(threading.current_t原创 2017-05-06 13:43:58 · 558 阅读 · 0 评论 -
Python pip使用国内镜像
pip使用国内镜像 在用户主目录下创建目录和文件 ~/.pip/pip.conf [global] index-url = https://pypi.douban.com/simple download_cache = ~/.cache/pip [install] use-mirrors = true mirrors = http://pypi.douban.com/原创 2018-01-01 14:32:14 · 578 阅读 · 0 评论