02 2022 档案
MySQL去重并保留id最小的数据
摘要:''' 只需要修改数据库连接即可 ''' import pymysql import requests connect = pymysql.Connect( host='140.210.4.73', port=3306, user='twipad_cj', passwd='bj@#twipad_cj
移位加密
摘要:dict = { 'a': '1', 'b': '2', 'c': '3', 'd': '4'}# 需要加密数据key = 'abcd'keys = ''for i in key: i = dict[i] keys += str(i)print(keys)
base64加解密
摘要:# -*- coding: cp936 -*-import base64src = "明文数据"tgt = base64.b64encode(src.encode('UTF-8'))print(tgt)src = base64.b64decode(tgt).decode('utf-8')print(
根据ID删除MySQL数据库以及iPad上数据
摘要:""" author:张鑫 date:2021/7/30 20:39 """ import requests import pymysql connect = pymysql.Connect( host='140.210.4.73', port=3306, user='twipad_cj', pas
JSON.parse() 与 JSON.stringify() 简单使用
摘要:JSON.parse() :是从一个字符串中解析出 json 对象 //定义一个字符串 var data='{"name":"goatling"}' //解析对象 JSON.parse(data) 结果是: name:"goatling" JSON.stringify():是从一个对象中解析出
读取txt文件,并写入列表
摘要:import osclasses_path = os.path.expanduser('列表')with open(classes_path, 'r', encoding='UTF-8') as f: class_names = f.readlines()class_names = [c.strip
mysql查询重复数据
摘要:select * from hkby_facebookhistory_abroaddataall where ir_content in (select A.ir_content from((select ir_content from hkby_facebookhistory_abroaddata
Python3 SyntaxError: Non-UTF-8 code starting with ‘\xe3‘ in file xxx.py
摘要:第一行添加 # -*- coding: utf-8 -*-