随笔分类 - Python
Python全栈
摘要:https://blog.51cto.com/2226894115/2057959
阅读全文
摘要:首先,打开centos7,在选择进入系统的界面按“e”进入编辑页面。 然后按向下键,找到以“Linux16”开头的行,在该行的最后面输入“init=/bin/sh” 接下来按“ctrl+X”组合键进入单用户模式 然后输入“ls”查询当前位置(也可以省略),回车 接下来再输入“mount -o rem
阅读全文
摘要:如何用Pyinstaller打包显示版本号的exe程序参考链接:https://zhuanlan.zhihu.com/p/20731500https://blog.csdn.net/hurray123/article/details/48521845 关于pyinstaller的用法可以在命令行下输
阅读全文
摘要:pip install ctypes from ctypes import while True: u = windll.LoadLibrary('user32.dll') result = u.GetForegroundWindow() time.sleep(5) print(result) 0则
阅读全文
摘要:1、首先确保你的系统里已经安装了Conda,打开命令行窗口,执行命令:conda --version 2、查看你的系统当前已有的Python环境,执行命令:conda info --envs,从图中我们看到,我的机器里目前只有安装Anaconda时创建的默认Python环境,环境名称叫root,对应
阅读全文
摘要:https://www.cnblogs.com/xiandedanteng/p/9009964.html
阅读全文
摘要:import time, datetime, re, subprocess, sys, os, win32net, win32api, win32con, win32netcon, win32security, pymysql, time, \ wmi, requests, ctypes, json
阅读全文
摘要:import os,retop = os.popen("tasklist")process_list = []split_r = r"\s+"memory_topTen = []for key,item in enumerate(top): item = str(item).rstrip("\n")
阅读全文
摘要:import osa = []with open("pp.txt","r+",encoding="utf8") as file: for line in file.readlines(): a.append(line.strip("\n"))print(a)b = ""for item in a:
阅读全文
摘要:import time,os,datetimeimport urllib3utcNow = datetime.datetime.utcnow()fifteen = utcNow +datetime.timedelta(minutes=-15)timestr = fifteen.strftime('%
阅读全文
摘要:./configure --prefix=/usr/local/python3 --with-ssl --enable-optimizations make && make install
阅读全文
摘要:from __future__ import print_function import ctypes, sys, os def is_admin(): try: return ctypes.windll.shell32.IsUserAnAdmin() except: return False if
阅读全文
摘要:from urllib import parse s = parse.unquote("%7B%22name%22%3A%22joe%22%2C%22age%22%3A%2223%22%7D") print(s) import json b = json.loads(s) print(type(b)) print(b['name'])
阅读全文
摘要:https://www.crifan.com/python_re_sub_detailed_introduction/
阅读全文
摘要:str2 ="2018-10-29"c =re.sub(r"(\d{4})-(\d{2})-(\d{2})","\g<1>/\g<2>/\g<3>",str2)print(c)
阅读全文
摘要:Django The web framework for perfectionists with deadlines. OVERVIEW DOWNLOAD DOCUMENTATION NEWS COMMUNITY CODE ABOUT ♥ DONATE The web framework for p
阅读全文
摘要:import xlwtworkbook = xlwt.Workbook(encoding='utf8')ws = workbook.add_sheet('monitor_sheet')data = models.PcMonitor_Line.objects.all()ser = TableSeria
阅读全文
摘要:我是 环境管理 管理 Python 版本和环境的工具 pyenv – 简单的 Python 版本管理工具。 Vex – 可以在虚拟环境中执行命令。 virtualenv – 创建独立 Python 环境的工具。 virtualenvwrapper– virtualenv 的一组扩展。 包管理 管理包
阅读全文
摘要:from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericRelation,GenericForeignKey class SuperCourse(models.Mod...
阅读全文
摘要:http://www.cnblogs.com/zjcode/p/9131338.html
阅读全文

浙公网安备 33010602011771号