
python
shaomingshan_
这个作者很懒,什么都没留下…
展开
-
Python中栈的实现
话不多说直接上代码class Stack(): def __init__(self, size): self.size = size self.stack = [] self.top = -1 # 返回元素在栈中的位置 def location(self, ele): temp = Stack(self.size)原创 2016-11-04 23:30:53 · 1567 阅读 · 0 评论 -
python实现图片操作
前段时间在知乎看到大神用Ruby做的下面这样一张图,觉得非常有意思,所以打算用python实现一下 python有图像处理标准库PIL(Python Imaging Library),功能强大,简单易用,可惜只支持2.x,Pillow是在PIL基础上创建的兼容版本,支持python 3.x,同时增加了一些新特性。安装Pillow直接在命令行使用pip安装,十分方便pip install Pil原创 2018-01-28 15:34:37 · 6890 阅读 · 0 评论 -
python生成条形码
python生成条形码有很多第三方库,我大致尝试了几个常用的库,简单谈一下感受。 先说结果,如果你是用python3.x,建议使用pyStrich。pyBarcode能找到较多资料,使用也较简单 直接pip安装 pip install pyBarcode 这里以EAN13码举例from barcode.writer import ImageWriterfrom barcode.ean imp原创 2018-03-28 13:59:16 · 27874 阅读 · 1 评论