随笔分类 - Python
摘要:按Shift + Alt + F10快捷键
阅读全文
摘要:[root@]# pip install elasticsearch==6.8.2 Collecting elasticsearch==6.8.2 Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/96/7a/3627579d85
阅读全文
摘要:环境:OS:Windows 11python:3.6.8 1.切换到虚拟环境目录:cd C:\Users\huangxueliang\PycharmProjects\cmdbtest\venv 2.执行如下命令Scripts\activate 3.强制重新安装python -m pip instal
阅读全文
摘要:1.官网下载pycharm 下载地址 https://www.jetbrains.com/pycharm/download/other.html下载的版本为2022.1 2.下载解压包链接:https://pan.baidu.com/s/1sdG_-gVbazXxMqE4--L-CQ 提取码:itr
阅读全文
摘要:[root@dsc1 mydjango]# pip3 install django pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Co
阅读全文
摘要:# -*- coding: utf-8 -*- from email.mime.text import MIMEText from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart imp
阅读全文
摘要:# -*- coding: utf-8 -*- from pyecharts import options as opts from pyecharts.charts import Pie import pymysql from snapshot_phantomjs import snapshot
阅读全文
摘要:环境:OS:Centos 7 1.下载地址https://phantomjs.org/download.html 2.添加环境变量/opt/phantomjs/bin [root@host134 ~]# which phantomjs/opt/phantomjs/bin/phantomjs 3.安装
阅读全文
摘要:1.114版本之前的下载地址https://chromedriver.storage.googleapis.com/index.html? 2.115之后的下载地址https://googlechromelabs.github.io/chrome-for-testing/
阅读全文
摘要:[root@host134 scripts]# more os.py # -*- coding: utf-8 -*- import datetime import time import sys import os import platform import psutil while True:
阅读全文
摘要:python 3.6 #!/usr/bin/env python #coding=utf-8 import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from
阅读全文
摘要:环境; Python:3.6.5 需要安装redis-py-cluster模块 #!/usr/bin/env python #coding=utf-8 from rediscluster import RedisCluster startup_nodes = [ {"host": "192.168.
阅读全文
摘要:环境: Os:Centos 7 mysql:5.7.29 ssl:自制证书 python:3.6.5 import pymysql import ssl ssl.match_hostname = lambda cert, hostname: True config = { 'host': '192.
阅读全文
摘要:#!/usr/bin/env python #coding=utf-8 import os, json, urllib, datetime, shutil,random,uuid from random import choice import pymysql import traceback im
阅读全文
摘要:环境: Python:3.6.5 #!/usr/bin/env python #coding=utf-8 import os, json, urllib, datetime, shutil import time import cx_Oracle gl_mysql_server="192.168.1
阅读全文
摘要:环境: db:19c python:3.6 最近有使用到cx_oracle(5.3)模块,这里记录下出现的问题由于我的项目一直在是windows上测试,最近把项目更新到linux下后,再去跑代码,发现代码报出ORA-28040: No matching authentication protocol
阅读全文
摘要:#!/usr/bin/env python #coding=utf-8 import os, json, urllib, datetime, shutil import psycopg2 import traceback import time gl_mysql_server="192.168.1.
阅读全文
摘要:##当天日期today = datetime.date.today()print(today)##获取当前月的第一天first = today.replace(day=1)print(first)##减一天,得到上个月的最后一天last_month = first - datetime.timede
阅读全文
摘要:环境: OS:Centos 7 1.安装python3.5可能使用的依赖yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel gcc 2.到python官网找到下载路径, 用w
阅读全文