上一页 1 ··· 120 121 122 123 124 125 126 127 128 ··· 188 下一页
摘要: import pymysql connect = pymysql.connect(user = 'm', password = 'M', db = 'x', host = 'rm', port = 3306, charset = 'utf8' ) con = connect.cursor() bu= 阅读全文
posted @ 2021-11-03 16:57 myrj 阅读(892) 评论(0) 推荐(0)
摘要: import configparser,sys cf = configparser.ConfigParser() #写INI def xini(): executor_url = "100" session_id = "6666" cf.add_section("ssh") cf.set("ssh" 阅读全文
posted @ 2021-11-03 14:04 myrj 阅读(369) 评论(0) 推荐(0)
摘要: begin declare sum int(0); select count(*) into sum from bm51 where bzz='0'; if (sum<20) then UPDATE bm51 SET bzz='0'; end if; end 阅读全文
posted @ 2021-11-02 16:50 myrj 阅读(50) 评论(0) 推荐(0)
摘要: UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 14-14: Non-BMP character not supported in Tk 出现类似表明不能输出相应的代码,只要不输出就不报错了 阅读全文
posted @ 2021-11-02 05:57 myrj 阅读(453) 评论(0) 推荐(0)
摘要: import pymysql,itertools connect = pymysql.connect( user = 'm', password = '0', db = 'x', host = 'r', port = 3306, charset = 'utf8' ) con =connect.cur 阅读全文
posted @ 2021-10-30 07:08 myrj 阅读(120) 评论(0) 推荐(0)
摘要: if isinstance(item,MmzItem): data = {'xinxi':item['xinxi']} xinxia = data['xinxi'] print(len(xinxia),type(xinxia)) #print("ffffffffffffff",xinxi[0],xi 阅读全文
posted @ 2021-10-30 04:52 myrj 阅读(164) 评论(0) 推荐(0)
摘要: import pymysql import openpyxl import time def export_to_excel(worksheet, cursor, table): """ 将MySQL一个数据表导出到excel文件的一个表的函数 :param worksheet: 准备写入的exce 阅读全文
posted @ 2021-10-29 09:53 myrj 阅读(603) 评论(0) 推荐(0)
摘要: #!/usr/bin/python # -*- coding: UTF-8 -*- import random import string # 随机整数: print random.randint(1,50) # 随机选取0到100间的偶数: print random.randrange(0, 10 阅读全文
posted @ 2021-10-26 06:16 myrj 阅读(109) 评论(0) 推荐(0)
摘要: import requests from bs4 import BeautifulSoup url1 = "https://www.zzlian.com/33.html" html = requests.get(url1).content html=html.decode('utf-8') # py 阅读全文
posted @ 2021-10-25 06:16 myrj 阅读(950) 评论(0) 推荐(0)
摘要: import requests,sys from bs4 import BeautifulSoup def gethml(url): rr=requests.get(url) s=rr.content s.decode("ISO-8859-1") return s html=gethml(url) 阅读全文
posted @ 2021-10-24 19:20 myrj 阅读(67) 评论(0) 推荐(0)
上一页 1 ··· 120 121 122 123 124 125 126 127 128 ··· 188 下一页