![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
Dawn__Z
这个作者很懒,什么都没留下…
展开
-
python 对excel表格操作
详情见代码: #!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat Dec 2 15:40:35 2017 @author: 260207 """ from xlutils.copy import copy import xlrd import xlwt def set_style(name = 'Times ...原创 2018-12-15 14:20:52 · 1639 阅读 · 0 评论 -
Python 类class和对象
Python 类class和对象 类(class):定义一件事物的抽象特点,usually,类定义了事物的属性和它可以做到的性为 对象(object):是类的实例。 1.基本点 class MyClass(object): message = "hello,world" def show(self): print (self.message) 类名为MyC...原创 2019-03-07 11:41:09 · 383 阅读 · 0 评论 -
python 实现c++/c调用
python 实现c++/c调用 详情可以查看:https://blog.csdn.net/l_xzmy/article/details/82183613 //编译C++,一定要加extern “C”,注意C为大写,小写会无法识别 import os import ctypes time_point = '2019-04-02 05:30:58' weight = 80 def run_img_...原创 2019-04-10 11:04:05 · 223 阅读 · 1 评论 -
python opencv 旋转图像大小不变
旋转图像大小不变 def rotate_bound(image, angle): """ :param image: 原图像 :param angle: 旋转角度 :return: 旋转后的图像 """ # grab the dimensions of the image and then determine the # center ...转载 2019-06-19 19:21:11 · 3325 阅读 · 0 评论 -
python 连接接口请求
python 连接接口请求 from pandas.io.json import json_normalize # 数据接口 base_url = 'http:Api' def person_information_system(id_card): """ 连接员工表 :param id_card: 号码 :return:基本信息 """ # ...原创 2019-08-05 11:08:21 · 728 阅读 · 0 评论 -
线程与进程
一、多线程与多进程概念: 进程:os中每个任务就是一个进程 线程:一个进程有很多线程,每个线程做一件事; 一个进程中有多个线程就是多线程; 单核计算机也可以实现多进程与多线程; 线程与进程切换由操作系统来决定。 二、多线程的问题: 线程不安全:不多线程中,变量是共享的,多个线程同时操作一个变量会引发变量的数据异常; GIL全局解释器锁:每个进程一把锁,启动线程先加锁,结束线程释放锁; 复杂程序的分...转载 2019-07-26 15:40:39 · 178 阅读 · 0 评论 -
python 多线程threading
python多线程threading.Thread实现: # 假设这是网络程序,请求数据 def request_data(num): time.sleep(num) # 模拟网络操作 # 单线程任务 def main_single_thread(): for i in range(100): request_data() def main_multi...原创 2019-07-27 10:02:38 · 212 阅读 · 0 评论