随笔分类 - Python
摘要:环境: Python:3.6.5 pip install requests pip install json #!/usr/bin/env python #coding=utf-8 import json import requests # 你复制的webhook地址 url = "https://
阅读全文
摘要:环境: elasticsearch:6.8.5 开发工具:PyCharm 1.windows机器安装与服务器器相同版本的es pip3 install elasticsearch==6.8.0 2.创建index #!/usr/bin/env python #coding=utf-8 from el
阅读全文
摘要:#-*-coding:utf-8 -*- tiangan = {4: "甲", 5: "乙", 6:"丙",7:"丁",8:"戊",9:"己",0:"庚",1:"辛",2:"壬",3:"奎"} dizhi = {4: "子", 5: "丑", 6:"寅",7:"卯",8:"辰",9:"巳&
阅读全文
摘要:def call_sp_test(): delete_sql = "call sp_test()" # 打开数据库连接 db = pymysql.connect(host=insert_mysqlserver, user=insert_username, password=insert_passwo
阅读全文
摘要:python 3.6 # -*- coding: utf-8 -*- import pymysql import smtplib import datetime import time mysql_server="192.168.1.22" user_name="root" password= "y
阅读全文
摘要:(python37-venv) [yeemiao@yeemiao-oracle-9e96168-prd scripts]$ more sync_cratedbdata_to_clickhouse_temp.sh #!/bin/bash source /etc/profile source /home
阅读全文
摘要:python版本:3.6 #!/usr/bin/env python #coding=utf-8 from crate import client import os, time, datetime import time from clickhouse_driver import Client i
阅读全文
摘要:python 2.7环境 [root@localhost send_wrong_sql]# more send_fujin01.py #!/usr/bin/env python # -*- coding: UTF-8 -*- import smtplib from email.mime.multip
阅读全文
摘要:python版本:3.7 安装依赖包 pip3 install pymysql pip3 install py-emails (python37-venv) [root@localhost send_wrong_sql]# more py3_mysqlhost_192.168.1.22.py #!/
阅读全文
摘要:[root@localhost send_wrong_sql]# python -VPython 2.7.5 # -*- coding: utf-8 -*- import pymysql import smtplib import datetime import time from email.mi
阅读全文
摘要:[root@localhost send_wrong_sql]# pipTraceback (most recent call last): File "/usr/bin/pip", line 9, in <module> load_entry_point('pip==21.0.1', 'conso
阅读全文
摘要:1.安装python3.7可能使用的依赖yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel2.到python官网找到下载路径, 用wget下载wget https://www
阅读全文
摘要:环境:OS:windowsPython:3.6.81.下载cx-Oraclehttps://pypi.org/project/cx-Oracle/6.4.1/#files2.安装pip.exe install E:\python_oracle\cx_Oracle-6.4.1-cp36-cp36m-w
阅读全文
摘要:python2和python3都可以执行
阅读全文
摘要:环境: python2.7和python3.6都可以执行 方法1:字段拼接 #!/usr/bin/python3 import pymysql import smtplib import datetime import time now_time = datetime.datetime.now()
阅读全文
摘要:[yeemiao@localhost sendmail]$ more sendtest.py # -*- coding: utf-8 -*- # Author: hkey from email.header import Header from email.mime.text import MIMEText from email.mime.multipart import MIMEMult...
阅读全文