- 博客(17)
- 资源 (3)
- 收藏
- 关注

原创 使用Python制作证件照
制作证件照我们主要有两个工作: 1. 修改照片背景 2. 修改照片尺寸 修改背景我们需要用到第三方库removebg,修改照片尺寸需要用到PIL库,这两个库的安装使用pip install removebg和pip install Pillow即可。 removebg涉及到api_key,需要到其官网注册并申请:https://accounts.kaleido.ai/users/sign_up接下来通过代码demo如何制作证件照#e...
2020-06-23 22:24:40
3708
1

原创 Pandas read_excel()参数详解
Pandas read_excel()参数使用详解read_excel函数原型def read_excel(io, sheet_name=0, header=0, names=None, index_col=None, parse_cols=None, usecols=None, squeez
2020-05-28 16:22:48
44675
2
原创 Scrapy 小白自学笔记
Scrapy 小白自学笔记Scrapy 小白自学笔记Scrapy环境搭建安装scrapypip install scrapy安装pywin32D:>pip install pywin32Collecting pywin32Using cached pywin32-223-cp35-cp35m-win32.whlInstalling collected packages: pywin32Successfully installed pywin32-223创建一个scrapy工程
2020-06-23 22:34:25
1972
原创 Pandas read_excel()函数 thousands参数的使用
Pandas read_excel()函数thousands参数的使用最近在学习使用pandas的read_excel()函数使用,在查看API文档时,看到thousands参数的描述:thousands [str, default None] Thousands separator for parsing string columns to numeric. Notethat this parameter is only necessary for columns stored as TEXT..
2020-05-28 17:17:25
1951
原创 PyQT 入门(二)
3. 入门2: 通过Qt Designer设计应用程序3.1. Step 1: 使用Qt Designer设计UIUi: demo.uiCode:demo.ui转python code 可以通过指令: pyuic5 demo.ui -o ui_demo.py 来实现ui_demo.py# -*- coding: utf-8 -*-# Form implementation generated from reading ui file 'demo.ui'## Created by:
2020-05-27 15:04:01
372
原创 PyQT 入门(一)
1. 预置条件以下内容全部基于Python 3.5.3 + PyQt5.8.22. 入门1:创建自定义Widget: MyWidget2.1. Step 1: 最简易的showCode:import sysfrom PyQt5.Qt import QWidget, QApplicationclass MyWidget(QWidget): ''' do nothing here ''' passdef main(): app = QApp
2020-05-27 14:53:24
231
原创 pandas根据index批量获取数据
今天遇到一个需要根据dataframe index批量获取数据的问题,记录一下。总表:records.csv,所有数据记录。总表数据:datedata2014/3/10.9470149822014/6/10.7461038182014/9/10.7367648412014/12/10.7249376242015/3/10.850437382015/6/10.3325032122015/9/10.752893662015/12/
2020-05-25 16:59:39
6350
原创 Python实现Bugzilla Web Service功能(四)【完结】
在Python实现Bugzilla Web Service功能(一)、Python实现Bugzilla Web Service功能(二)、Python实现Bugzilla Web Service功能(三)这三篇文章介绍了基于Bugzilla REST API的Web Service功能实现,本篇介绍如何使用该WebService功能。test.py#encoding=utf-8from bugzillawebservice import BugzillaWebServiceurl_base = "
2020-05-22 16:13:51
412
原创 Python实现Bugzilla Web Service功能(三)
在Python实现Bugzilla Web Service功能(二)中我们实现了Bugzilla的一些基本操作,如Bug查询、Bug历史、创建Bug、更新Bug等功能,本篇实现将以上功能封装为一个service库。file: bugzillawebservice.pyimport bugsimport commentsimport attachmentsclass BugzillaBase(): def __init__(self, url_base, api_key):
2020-05-22 15:35:55
583
原创 Python实现Bugzilla Web Service功能(二)
在Python实现Bugzilla Web Service功能(一)中我们实现了http Get/Put/Post功能。本篇介绍基于http Get/Put/Post功能实现对Bugzilla的一些基本操作,如Bug查询、Bug历史、创建Bug、更新Bug等实现。file: bugs.py#encoding=utf-8from [common](https://blog.youkuaiyun.com/leenuxcore/article/details/93499330) import *@RequestGe
2020-05-22 15:24:54
769
原创 python lambda替代if else/switch case
在编程中,我们常常会遇到使用if…else的情况,某些语言中在if…else过多的时候我们会使用switch…case来替代if…else以避免代码结构过于冗长。Python是不支持switch…case语法的,自然无法使用switch…case来替代if…else结构。但好在强大的Python支持lambda, 本文就是介绍一种用lambda来替代if…else的方法实现。先看看lambda 函数语法:lambda [arg1 [, agr2,.....argn]] : expression例
2020-05-18 10:06:53
4294
原创 Python +Qt 实现Simulator(升级版本)
在<Python +Qt 实现Simulator>这篇文章中介绍了Python +Qt 实现simulator的功能,此篇为升级版本.先看实现的效果:main.py#encoding=UTF-8import traceback,reimport subprocess,os,sysclass ADB: def __init__(self, device=None): self.active_device = device self.devic
2020-05-13 09:58:09
591
原创 Xor异或运算实现二值交换
Xor异或运算实现二值交换算法公式(一):A=ABB=ABA=AB推导:取a、b任意同位的1个bit进行运算:为方便,a、b的同位bit分别用A、B表示;这两个bit的值要么相同,要么不同。我们针对这两种情况分别做运算,检查结果是否一致:表(一)由上表可知,当A、B值相同时,无论其值为0还是为1,经过公式(一)的运算后B1=A,A2=B,即A、B的值实现了互换;同理,当A...
2019-06-28 17:17:36
716
转载 Arm的几种工作模式和工作状态
Arm的几种工作模式和工作状态本文转载自:http://blog.chinaunix.net/uid-28458801-id-3494646.htmlARM处理器工作模式一共有 7 种 :USR 模式正常用户模式,程序正常执行模式FIQ模式(Fast Interrupt Request)处理快速中断,支持高速数据传送或通道处理IRQ模式处理普通中断SVC模式(Superviso...
2019-06-27 13:38:23
2924
原创 32位单精度浮点数存储格式
32位单精度浮点数的存储格式:其中s为符号位,占据1bit, f是由低23个bit组成的分数,最高位为0.5,然后是0.25,以此类推。e为2的指数幂,b为偏置(在32位单精度里b=127).所以一个32位单精度的存储排列是这样的:由此,我们可以看1.5在32位单精度浮点数中的存储表示:s = 0 (a positive number)f = 100 0000 0000 0000 0...
2019-06-26 14:35:56
8225
2
原创 Python实现Bugzilla Web Service功能(一)
本问介绍如何通过python实现Bugzilla Web Service的调用。关于Bugzilla web service的介绍,可以参考其官方文档:WebService API ReferenceBugzilla web service获取/发送数据的方式是通过http Get/Put/Post实现的,所以我们先通过python实现http Get/Put/Post功能:from fun...
2019-06-24 17:16:53
772
原创 Python +Qt 实现Simulator
Python +Qt 实现simulator*#encoding=UTF-8import osimport sysimport reimport subprocessimport traceback#from win32api import GetSystemMetricsfrom win32api import GetSystemMetricsfrom PyQt5.Qt im...
2019-06-24 14:29:43
491
BugzillaWebServices.rar
2020-05-22
bochs_2_6_11_Win_VS2010.rar
2020-02-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人