netstat -ano | findstr 9006
tasklist | findstr 7648
taskkill /pid 编号 /f
python manage.py runserver 127.0.0.1:9000
| # coding= utf-8 | |
| import sys, os | |
| import json | |
| sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) | |
| import pymysql | |
| # print("dataprovider----------------------------------") | |
| # print(sys.path) |
import pymysql
#db库名 charset=utf8
conn = pymysql.connect(host=self.host, port=self.port, user=self.user, passwd=self.passwd, db=self.db,
charset=self.charset)
# 根据条件查询
select_sql = "select entity_count from jk_topic where topic_id = %s and entity_id = %s"%(topic_id,key)
cur = conn.cursor(cursor=pymysql.cursors.DictCursor)
cur.execute(select_sql, args)
| # -*-coding:utf8-*- | |
| import requests | |
| import json | |
| """调用api""" | |
| # base_url = 'https://api.ce-cotoha.com/api/dev/nlp/v1/ne' | |
| # # | |
| # header = {"Content-Type": "application/json;charset=UTF-8","Authorization": "Bearer pbFMu1AvABbqyV79ZGwijIMYspzi"} | |
| # # |
| import os | |
| import random | |
| import re | |
| import json | |
| import requests | |
| from opencc import OpenCC | |
| import spacy | |
| import stanza | |
| list_en_name = [] |