自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 资源 (1)
  • 收藏
  • 关注

原创 PyGame 钟表

import pygamefrom pygame.locals import *import mathimport datetimeimport sysdef print_text(font, x, y, text, color=(0,0,0)): imgText = font.render(text, True, color) screen.blit(imgText...

2020-04-15 10:40:35 150

原创 Python 加密编译

一、编译.py文件为.pyc文件# -*- coding: utf-8 -*-import py_compilefile_path = 'demo.py'py_compile.compile(file_path)二、编译.py文件为二进制可执行文件1、安装cythonpip install cython2、Python代码转换为C代码cython demo.py --e...

2020-04-12 13:30:44 401

原创 Linux 批量关闭进程

ps -ef | grep LOCAL=NO | grep -v grep | cut -c 9-15 | xargs kill -9LOCAL=NO为模糊匹配字段

2020-04-12 12:12:08 198

原创 Linux 查看端口号占用情况

lsof -i :5000

2020-04-12 12:08:29 72

原创 md5

import randomimport hashlibdef get_md5_digits(text): seed = "1234567890abcdefghijklmnopqrstuvwxyz" sa = [] for i in range(8): sa.append(random.choice(seed)) salt = ''.join(sa) + text has...

2020-04-12 12:04:25 54

原创 Python 时间模块

#! -*- coding: utf-8 -*- import timeimport datetime'''time & datetime 时间模块的相关计算'''# -------------------------datetime module ---------------------------- ## 当前时间(datetime form)now_time =...

2020-04-12 11:54:36 62

原创 xlrd 操作excel

# -*- coding: utf-8 -*-import xlrdimport numpy as np def read_excel(file, sheet_nums, col_num, row_num, cell_index): data = xlrd.open_workbook(file) for i in range(sheet_nums): ta...

2020-04-12 11:53:19 108

原创 OpenCV 信号灯状态简单识别

#!/usr/bin/env python#-*- coding:utf-8 -*- import cv2 import numpy as np import sys,os,shutilimport timereload(sys)sys.setdefaultencoding('utf8')if __name__ == '__main__': object_pic = c...

2020-04-12 11:51:03 2061

原创 OpenCV 基于SIFT的特征匹配

import cv2'''src_img: source picdst_img: target picdst_img_set: target pic setsrc_coor: (src_x, src_y, src_w, src_h)dst_coor: (dst_x, dst_y, dst_w, dst_h)dst_img_set: [(dst_x1, dst_y1, dst_w1...

2020-04-12 11:49:25 547

原创 python3 操作mysql

import pymysqlimport loggingdb = Nonedef execute_sql(sql, action='select'): try: if db is None: db = pymysql.connect(host='127.0.0.1', port=3306,user='admin', passwd='admin', db=admin...

2020-04-12 11:47:19 56

原创 计算两个矩形的交并比

def calcIOU(one_x, one_y, one_w, one_h, two_x, two_y, two_w, two_h): if((abs(one_x - two_x) < ((one_w + two_w) / 2.0)) and (abs(one_y - two_y) < ((one_h + two_h) / 2.0))): lu_x_inter...

2020-04-12 11:41:17 402

原创 Linux操作总结(不断更新)

ps -ef | grep PROCESS_NAME | grep -v grep | cut -c 9-15 | xargs kill -9Linux批量关闭进程。其中,PROCESS_NAME为需要关闭的进程名称。ls | wc -l统计当前目录下的文件数量。% s/expr1/expr2/gVIM全局替换某个表达式。其中,expr1是初始表达式,expr2是目标表达...

2020-04-05 00:04:50 51

原创 第一天----打卡纪念一下

还是觉得应该找个地方记录一下自己平时接触到的东西,不知道在这许多平台中CSDN是不是适合自己?总之先坚持做一段时间,不可以了就再换吧。

2019-05-19 12:59:56 156

转载 Python Requests 操作指南

https://blog.csdn.net/joson1234567890/article/details/52064621

2019-05-08 14:18:22 74

转载 Python多进程multiprocessing用法实例分析

https://www.jb51.net/article/121508.htm

2019-05-08 11:20:37 254

转载 Python守护进程daemon实现

https://blog.csdn.net/zhaihaifei/article/details/70213431

2019-05-08 11:03:39 1008

转载 python deamon example

https://blog.csdn.net/th1019/article/details/56486758#commentBox转载。

2019-05-08 10:39:02 53

socket编程.doc

什么是socket ?所谓socket通常也称作"套接字",用于描述IP地址和端口,是一个通信链的句柄。应用程序通常通过"套接字"向网络发出请求或者应答网络请求。说白了就是一种通信机制。它类似于银行,电信啊这些部分的电话客服部门。你打电话的时候,那边会分配置一个人回答你的问题,客服部门就相当于socket的服务器端了,你这边呢就相当于客户端了,在和你通话结束前,如果有人在想找和你通话的那个说话,是不可能的,因为你在和他通信,当然客服部门的电话交换机也不会重复分配。

2020-04-12

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除