- 博客(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 156
原创 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 407
原创 Linux 批量关闭进程
ps -ef | grep LOCAL=NO | grep -v grep | cut -c 9-15 | xargs kill -9LOCAL=NO为模糊匹配字段
2020-04-12 12:12:08 204
原创 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 58
原创 Python 时间模块
#! -*- coding: utf-8 -*- import timeimport datetime'''time & datetime 时间模块的相关计算'''# -------------------------datetime module ---------------------------- ## 当前时间(datetime form)now_time =...
2020-04-12 11:54:36 63
原创 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 114
原创 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 2087
原创 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 565
原创 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 58
原创 计算两个矩形的交并比
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 414
原创 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 53
原创 第一天----打卡纪念一下
还是觉得应该找个地方记录一下自己平时接触到的东西,不知道在这许多平台中CSDN是不是适合自己?总之先坚持做一段时间,不可以了就再换吧。
2019-05-19 12:59:56 158
转载 Python Requests 操作指南
https://blog.csdn.net/joson1234567890/article/details/52064621
2019-05-08 14:18:22 77
转载 Python守护进程daemon实现
https://blog.csdn.net/zhaihaifei/article/details/70213431
2019-05-08 11:03:39 1018
转载 python deamon example
https://blog.csdn.net/th1019/article/details/56486758#commentBox转载。
2019-05-08 10:39:02 57
socket编程.doc
2020-04-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人