摘要: partial 生成偏函数 concurrent.futures的map函数 with futures.ThreadPoolExecutor() as executor: 函数名 = partial(待处理函数,相关参数,可以为整数,字符串,可迭代对象) executor.map(函数名,可迭代对象 阅读全文
posted @ 2022-07-15 11:48 CodeYaSuo 阅读(52) 评论(0) 推荐(0) 编辑
摘要: import pymysql pymysql.install_as_MySQLdb() host = '127.0.0.1' user = 'user ' password = 'password ' port = 3306 database = 'database' conn_database = 阅读全文
posted @ 2022-06-29 10:45 CodeYaSuo 阅读(61) 评论(0) 推荐(0) 编辑
摘要: from datetime import datetime t = datetime.now() print(datetime.date(t)) print(t.isoformat(sep = ' ',timespec = 'seconds')) print(t.timestamp().__str_ 阅读全文
posted @ 2022-03-03 10:00 CodeYaSuo 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 1. python基础知识点 2. 字符串 3. 排序 4. 数据结构 5. 正则表达式 6. 线程 7. math 库 random 库 wordcloud 库 8. numpy基础 9. pandas基础 10. matplotlib简单图 11. mysql语句 12. 使用 pymysql 阅读全文
posted @ 2021-03-10 11:14 CodeYaSuo 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 在项目目录输入 git config --global credential.helper store 然后进行 git pull 输入用户名和密码 以后再 git pull 就不用录入了 阅读全文
posted @ 2022-12-07 09:32 CodeYaSuo 阅读(63) 评论(0) 推荐(0) 编辑
摘要: LOG_PATH = 'logs/debug' # 日志配置 LOGGING = { 'version': 1, #定义了配置文件的版本 'disable_existing_loggers': False, ## True表示禁用logger # 格式化 'formatters': { 'defau 阅读全文
posted @ 2022-07-19 10:40 CodeYaSuo 阅读(125) 评论(0) 推荐(0) 编辑
摘要: from win32com.client import Dispatch def just_open(filename='文件的绝对路径'): xlApp = Dispatch("Excel.Application") xlApp.Visible = False xlBook = xlApp.Wor 阅读全文
posted @ 2022-07-12 10:24 CodeYaSuo 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 将系统打开word 的默认应用修改为 office的word,不要使用wps 阅读全文
posted @ 2022-06-24 14:55 CodeYaSuo 阅读(452) 评论(0) 推荐(0) 编辑
摘要: from functools import wraps import time def timefn(fn): """计算性能的修饰器""" @wraps(fn) def measure_time(*args, **kwargs): t1 = time.perf_counter() result = 阅读全文
posted @ 2022-06-09 14:05 CodeYaSuo 阅读(50) 评论(0) 推荐(0) 编辑
摘要: import pyperclip pyperclip.copy(sql) 不支持linux 阅读全文
posted @ 2022-05-30 16:12 CodeYaSuo 阅读(27) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/qq_41945846/article/details/82589407 阅读全文
posted @ 2022-05-26 15:19 CodeYaSuo 阅读(71) 评论(0) 推荐(0) 编辑
摘要: pip3 install -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 包名称 pip install -i http://pypi.douban.com/simple/ --trusted-host pypi.do 阅读全文
posted @ 2022-05-25 14:32 CodeYaSuo 阅读(37) 评论(0) 推荐(0) 编辑
摘要: https://wxpy.readthedocs.io/zh/latest/index.html 阅读全文
posted @ 2022-04-01 22:19 CodeYaSuo 阅读(42) 评论(0) 推荐(0) 编辑
摘要: https://www.biaodianfu.com/python-schedule.html 阅读全文
posted @ 2022-04-01 22:13 CodeYaSuo 阅读(20) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/a663e52e6488 import queue import datetime import threading import functools class DelayedTask(object): def __init__(self, pl 阅读全文
posted @ 2022-04-01 22:01 CodeYaSuo 阅读(60) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd import pandex import urllib.request import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = ['SimHei'] data_dic = { 'dat 阅读全文
posted @ 2022-04-01 21:16 CodeYaSuo 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 最开始我使用到的 OCR 识别版本(v2.3) 当前版本界面(v5.38) 识别方面,确实很好用。截图之后,可以选择复制识别文本。 下载地址 https://gitee.com/DDDDDGOOO/PandaOCR.Pro#https://gitee.com/link?target=https%3A 阅读全文
posted @ 2022-03-31 23:10 CodeYaSuo 阅读(312) 评论(0) 推荐(0) 编辑
摘要: btn.config(state=tk.DISABLED) https://tieba.baidu.com/p/6734353611 阅读全文
posted @ 2022-03-31 11:56 CodeYaSuo 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 使用 sys.exit(0) 比 exit(0) 在退出时,更加兼容 阅读全文
posted @ 2022-03-30 17:20 CodeYaSuo 阅读(25) 评论(0) 推荐(0) 编辑
摘要: UPDATE 表名 AS 别名 SET 别名.字段 = ( CASE 别名.字段 WHEN 1 THEN 999 WHEN 2 THEN 1000 END) WHERE 条件; 阅读全文
posted @ 2022-03-30 15:26 CodeYaSuo 阅读(95) 评论(0) 推荐(0) 编辑
摘要: import subprocess subprocess.run(cmd代码,shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) 阅读全文
posted @ 2022-03-28 11:25 CodeYaSuo 阅读(272) 评论(0) 推荐(0) 编辑
摘要: from django.conf import settings import django import pymysql pymysql.install_as_MySQLdb() INSTALLED_APPS = [] DATABASES = { 'default': { 'ENGINE': 'd 阅读全文
posted @ 2022-03-25 12:42 CodeYaSuo 阅读(847) 评论(0) 推荐(0) 编辑
摘要: from django.http import HttpResponse,JsonResponse from django.shortcuts import render from django.db import connection # Create your views here. ''' i 阅读全文
posted @ 2022-03-09 21:16 CodeYaSuo 阅读(168) 评论(0) 推荐(0) 编辑
摘要: from datetime import datetime t = datetime.now() now_time = t.isoformat(sep=' ', timespec='seconds') 阅读全文
posted @ 2022-02-25 09:39 CodeYaSuo 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 颜色方案 list(plt.colormaps.keys()) import numpy as np import matplotlib.pyplot as plt category_names = ['Strongly disagree', 'Disagree', 'Neither agree n 阅读全文
posted @ 2022-02-21 14:15 CodeYaSuo 阅读(274) 评论(0) 推荐(0) 编辑
摘要: https://www.jb51.net/article/172873.htm limit: Number.MAX_VALUE 阅读全文
posted @ 2022-02-19 11:18 CodeYaSuo 阅读(652) 评论(0) 推荐(0) 编辑
摘要: DELETE 别名 FROM 表名 别名 WHERE 别名.字段1 = '值' and 别名.字段2 = '值2' 阅读全文
posted @ 2022-02-19 10:34 CodeYaSuo 阅读(54) 评论(0) 推荐(0) 编辑
摘要: import MySQLdb # 打开数据库连接 db = MySQLdb.connect("localhost", "testuser", "test123", "TESTDB", charset='utf8',port = 3306) # 使用cursor()方法获取操作游标 cursor = 阅读全文
posted @ 2022-02-16 16:44 CodeYaSuo 阅读(38) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/randomlee/p/9752705.html pip install django-cors-headers==3.10.0 INSTALLED_APPS = [ ... 'corsheaders', ... ] MIDDLEWARE_CLASSE 阅读全文
posted @ 2022-02-15 16:50 CodeYaSuo 阅读(217) 评论(0) 推荐(0) 编辑
摘要: import shutil import os def del_file(filepath): try: del_list = os.listdir(filepath) except Exception as e: return for f in del_list: file_path = os.p 阅读全文
posted @ 2022-02-15 10:30 CodeYaSuo 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 当再出现游离的 HEAD 时,需要先对当前的分支,如 master 进行签出。 以后在进行添加代码内容时,先签出,然后再进行提交和推送。 阅读全文
posted @ 2022-02-15 10:26 CodeYaSuo 阅读(39) 评论(0) 推荐(0) 编辑
摘要: df.to_csv('表名.csv',index = False,encoding='utf-8-sig') 阅读全文
posted @ 2022-02-12 16:02 CodeYaSuo 阅读(159) 评论(0) 推荐(0) 编辑
摘要: now_time = datetime.now().isoformat(sep = ' ',timespec='seconds') 阅读全文
posted @ 2022-02-12 16:01 CodeYaSuo 阅读(105) 评论(0) 推荐(0) 编辑
摘要: json.dumps(字典,ensure_ascii=False) 阅读全文
posted @ 2022-02-12 16:00 CodeYaSuo 阅读(45) 评论(0) 推荐(0) 编辑
摘要: import warnings warnings.filterwarnings('ignore') 阅读全文
posted @ 2022-02-12 15:59 CodeYaSuo 阅读(26) 评论(0) 推荐(0) 编辑
摘要: Mysql 时分秒写法 %H:%i:%S Python 时分秒写法 %H:%M:%S 阅读全文
posted @ 2022-01-10 12:51 CodeYaSuo 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 确保使用的 Linux 服务器中 Python 环境是否安装了最新的 gunicorn 版本, 阅读全文
posted @ 2021-12-20 13:49 CodeYaSuo 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Latex公式手册 阅读全文
posted @ 2021-12-09 09:23 CodeYaSuo 阅读(104) 评论(0) 推荐(0) 编辑
摘要: pip install jupyter notebook -i http://pypi.mirrors.ustc.edu.cn/simple/ --trusted-host pypi.mirrors.ustc.edu.cn 阅读全文
posted @ 2021-12-06 15:46 CodeYaSuo 阅读(51) 评论(0) 推荐(0) 编辑
摘要: set PYTHONIOENCODING=utf-8 阅读全文
posted @ 2021-11-08 09:42 CodeYaSuo 阅读(90) 评论(0) 推荐(0) 编辑
摘要: sudo dd if=windows_10_professional_x64_2021.iso of=/dev/sdc bs=4M TRANSLATE with x English Arabic Hebrew Polish Bulgarian Hindi Portuguese Catalan Hmo 阅读全文
posted @ 2021-10-25 20:22 CodeYaSuo 阅读(145) 评论(0) 推荐(0) 编辑