![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
keepcode
这个作者很懒,什么都没留下…
展开
-
python有关时间的处理
#!E:\python\python.exe import time import datetime print time.localtime(time.time()-86400)#获取昨天的Unix时间戳 print time.time()#获取当前的Unix时间戳 today = datetime.date.today() oneday = datetime.timedelta(days=1)原创 2016-08-07 13:13:49 · 396 阅读 · 0 评论 -
python-openvc 图像灰度化处理 图像二值化处理
import cv2 from matplotlib import pyplot as plt im = cv2.imread(r"F:\vc0.png") im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY) im_at_mean = cv2.adaptiveThreshold(im_gray, 255, cv2.ADAPTIVE_THRESH_MEAN_原创 2017-10-13 17:45:10 · 4691 阅读 · 1 评论 -
python装饰器
# 类装饰器 class Foo(object): def __init__(self, func): self._func = func def __call__(self): print ('class decorator runing') self._func() print ('class decorator原创 2017-12-26 16:19:00 · 198 阅读 · 0 评论 -
python的pickle
示例:def test(): return 1 import pickle # import cPickle as pickle #C开发的pickle,速度更快 a = test b = {'a':'b'} with open('text.txt','wb') as file: pickle.dump(a,file) pickle.dump(b,file) with o...原创 2018-03-07 23:04:11 · 189 阅读 · 0 评论 -
websocket
http://kx.fx678.com/里的快讯信息是通过websocket更新。 地址如:ws://js.fx678.com:8000/socket.io/?EIO=3&transport=websocket&sid=obwa5h4xV0axhjBPAOm2 然后也有一些股票信息的更新: 地址如:ws://hqjs.fx678.com:9080/socket.io/?EIO...原创 2018-08-15 11:28:48 · 188 阅读 · 0 评论