摘要: ### 1. jionlp安装 ``` pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple jionlp ``` github地址 https://github.com/dongrixinyu/JioNLP ### 2. 简单使用 ``` 阅读全文
posted @ 2023-07-09 21:04 wstong 阅读(598) 评论(0) 推荐(0) 编辑
摘要: 在使用pandas写excel时,报了IllegalCharacterError的错误,发现是存在非法字符造成的,使用xlsxwriter模块可以解决这个问题 ```py import xlsxwriter data.to_excel('out.xlsx', engine='xlsxwriter') 阅读全文
posted @ 2023-07-07 21:07 wstong 阅读(404) 评论(0) 推荐(0) 编辑
摘要: FillerOrderNumber列的类型为TEXT,里面的值为 ![image](https://img2023.cnblogs.com/blog/3130057/202307/3130057-20230701235015577-1381579927.png) ![image](https://i 阅读全文
posted @ 2023-07-01 23:53 wstong 阅读(11) 评论(0) 推荐(0) 编辑
摘要: ```py a = [1,3,5,7,9] # 查找第一个大于等于x的位置 def lower_bound(l, r, x): while l <= r: mid = (l+r) // 2 if a[mid] < x: l = mid + 1 else: r = mid - 1 return l # 阅读全文
posted @ 2023-06-30 12:53 wstong 阅读(5) 评论(0) 推荐(0) 编辑
摘要: ```py import time import datetime def CalTime(date1, date2): # %Y-%m-%d %H:%M:%S为日期格式 # date1 = time.strptime(date1, '%Y-%m-%d %H:%M:%S') # date2 = ti 阅读全文
posted @ 2023-06-29 16:28 wstong 阅读(217) 评论(0) 推荐(0) 编辑
摘要: ### 1.web端控制台代码 ``` const successCallback = function(data) { console.log(data); } var import_js = document.createElement('script'); import_js.setAttri 阅读全文
posted @ 2023-06-21 20:11 wstong 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 先定义以下函数,然后使用console.save()来保存 ``` (function (console) { console.save = function (data, filename) { let MIME_TYPE = "text/json"; if (!data) return; if 阅读全文
posted @ 2023-06-21 08:25 wstong 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 需要做一个扩展,拦截XMLHttpRequest,修改response里面部分值,查阅资料后一般是通过下面方法拦截 ``` let oldOpen = XMLHttpRequest.prototype.open; XMLHttpRequest.prototype.open = function(me 阅读全文
posted @ 2023-06-17 16:42 wstong 阅读(948) 评论(1) 推荐(0) 编辑
摘要: 需要接收一个json对象,然后判断主键是否存在后执行插入操作 服务端 ``` from flask import Flask, request, jsonify from gevent import pywsgi import pymysql import config import json ap 阅读全文
posted @ 2023-06-12 19:25 wstong 阅读(833) 评论(0) 推荐(0) 编辑
摘要: 最近在研究一个网站发现网站使用了des加密,觉得使用python调用js可读性比较高,所以使用了以下方法来实现该网站的内容解密 ### 1. 安装PyExecJS ``` pip3 install PyExecJs ``` ### 2. 安装node.js https://nodejs.org/en 阅读全文
posted @ 2023-06-09 12:38 wstong 阅读(1261) 评论(0) 推荐(0) 编辑