上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页
import random def split_int(amount,num): """ :param amount: 拆分的数字 54782 :param num: 拆分成几组 4 :return: 拆分后得到的数组 [11001, 6085, 9494, 28202] """ list1 = [ Read More
posted @ 2022-06-17 14:40 PythonNew_Mr.Wang Views(599) Comments(0) Diggs(0) Edit
public class Cont { public static void main(String[] args) { // 只能使用 不能更改 System.out.printf("常量" + Constant.AGE); System.out.printf("NAME" + Constant. Read More
posted @ 2022-06-06 18:17 PythonNew_Mr.Wang Views(32) Comments(0) Diggs(0) Edit
def random_code_six(): """ :return 58yWNl """ str = "" for i in range(6): code = random.randrange(3) if code == 0: ch = chr(random.randrange(ord("A"), Read More
posted @ 2022-05-25 14:04 PythonNew_Mr.Wang Views(35) Comments(0) Diggs(0) Edit
# 输入字符串 返回加密数据 def md5_func(parameters): """ :USE: Encryption Data :param: String :return 9cd6afb07d85b28ead0cecd99c317158 """ ctime = str(time.time() Read More
posted @ 2022-05-25 14:02 PythonNew_Mr.Wang Views(74) Comments(0) Diggs(0) Edit
# 设置 不可编辑项 def get_readonly_fields(self, request, obj=None): # 判断是否是超级管理员 if request.user.is_superuser: self.readonly_fields = [] else: self.readonly_ Read More
posted @ 2022-05-12 16:49 PythonNew_Mr.Wang Views(260) Comments(0) Diggs(0) Edit
from wordcloud import ImageColorGenerator from matplotlib.image import imread import matplotlib.pyplot as plt # 输出分词组合 ciyun_str = ciyun_word_str(ciyu Read More
posted @ 2022-05-07 11:44 PythonNew_Mr.Wang Views(92) Comments(0) Diggs(0) Edit
def word_counts_action(text, top_number): """ :param text: 统计的文本 :param top_number: 输出词频前几 :return: [('非常', 36), ('很', 31), ('手机', 23), ('也', 18)] PS: Read More
posted @ 2022-05-06 21:23 PythonNew_Mr.Wang Views(46) Comments(0) Diggs(0) Edit
后端: message = {} list_f = models.Value_A.objects.all() str_list = "" for data in list_f: str_list = str_list +data.title + "," BASE_DIR = os.path.dirn Read More
posted @ 2022-04-14 10:27 PythonNew_Mr.Wang Views(29) Comments(0) Diggs(0) Edit
def fine_word(text_raw): """ :param text_raw: 文本 :return: 返回中文字符串 """ text = "" regStr = ".*?([\u4E00-\u9FA5]+).*?" re_text = re.findall(regStr, text_ Read More
posted @ 2022-04-14 09:53 PythonNew_Mr.Wang Views(64) Comments(0) Diggs(0) Edit
def find_province(city): """ :param city: "福州" :return: “福建” """ area_data = { '北京': ['北京市', '朝阳区', '海淀区', '通州区', '房山区', '丰台区', '昌平区', '大兴区', '顺义区', ' Read More
posted @ 2022-04-13 09:25 PythonNew_Mr.Wang Views(1811) Comments(0) Diggs(0) Edit
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页