
python
普通网友
这个作者很懒,什么都没留下…
展开
-
通过ricequant监测雪球舆情数据
import pandas as pd import matplotlib import matplotlib.pyplot as plt import datetime#general plot config #print(plt.style.available) matplotlib.style.use('classic') matplotlib.style.use('seaborn') plt原创 2017-04-30 15:14:26 · 8689 阅读 · 0 评论 -
Seaborn 统计数据可视化图标库 Overview
Seaborn是一个python统计数据可视化图标库(statistical data visualization) An introduction to seaborn Seaborn is a library for making attractive and informative statistical graphics in Python. It is built on top原创 2017-05-01 09:52:13 · 2183 阅读 · 0 评论 -
window 远程访问本地centos/redhat虚拟机上jupter notebook 配置方法
1.生成默认配置jupyter notebook --generate-config ipython profile create2.修改jupter配置vim .jupyter/jupyter_notebook_config.py c.NotebookApp.open_browser = False c.NotebookApp.ip = '192.168.56.101' c.ConnectionF原创 2017-05-04 09:19:39 · 3236 阅读 · 0 评论 -
使用multiprocessing包规避Python GIL多线程串行问题
1.Python是单核的,只能充分利用1个CPU的1个核 2.对一个多线程程序,线程间即使启动多个子解释器,依然有GIL这个全局锁,会引起串行。 串行是libpython导致的。 3.要使用Python做并行计算或规多线程穿行的问题。使用multiprocessing包时最好的选择。 在多进程环境下,每个进程可以运行一个解释器,互相之间是独立的,没有锁。multiprocessing包提供了原创 2017-04-23 19:32:25 · 11067 阅读 · 0 评论 -
Python的GIL是什么鬼,多线程性能究竟如何
前言:博主在刚接触Python的时候时常听到GIL这个词,并且发现这个词经常和Python无法高效的实现多线程划上等号。本着不光要知其然,还要知其所以然的研究态度,博主搜集了各方面的资料,花了一周内几个小时的闲暇时间深入理解了下GIL,并归纳成此文,也希望读者能通过次本文更好且客观的理解GIL。转载 2017-05-09 12:36:30 · 525 阅读 · 0 评论 -
Python's Hardest Problem -- GIL
One of the first long-form articles I ever posted to this blog was a piece about Python’s Global Interpreter Lock (GIL) entitled “Python’s Hardest Problem”. Two weeks ago, it was posted to Hacker News转载 2017-05-09 12:45:54 · 537 阅读 · 0 评论 -
Python 使用PIL numpy 实现拼接图片
python纵向合并任意多个图片,files是要拼接的文件list# -*- coding:utf-8 -*- def mergeReport(files): from PIL import Image import numpy as np baseimg=Image.open(files[0]) sz = baseimg.size basemat=np.at原创 2017-04-27 19:55:09 · 20178 阅读 · 4 评论