上一页 1 2 3 4 5 6 7 8 9 ··· 33 下一页
摘要: # -*- coding: utf-8 -*- """ @author: Mr_zhang @software: PyCharm @file: renamefile.py @time: 2021/8/18 下午2:55 """ import time import random # import o 阅读全文
posted @ 2021-08-18 16:10 前方、有光 阅读(59) 评论(0) 推荐(0)
摘要: def is_valid(self, raise_exception=False): assert hasattr(self, 'initial_data'), ( 'Cannot call `.is_valid()` as no `data=` keyword argument was ' 'pa 阅读全文
posted @ 2021-08-11 09:15 前方、有光 阅读(155) 评论(0) 推荐(0)
摘要: # 问题的起因是我后端设置如果参数为空不传。结果前端传给我空字符串。遂二次处理。 def create(self, request, *args, **kwargs): try: request.data._mutable = True except Exception as e: logger.i 阅读全文
posted @ 2021-08-07 11:38 前方、有光 阅读(439) 评论(0) 推荐(0)
摘要: LOG_NAME = os.path.join(BASE_DIR, 'logs', 'script_import.log')class Logger(object): level_relations = { 'debug': logging.DEBUG, 'info': logging.INFO, 阅读全文
posted @ 2021-07-30 13:47 前方、有光 阅读(85) 评论(0) 推荐(0)
摘要: import random import string def get_ip(): ips = ['58.14.0.0', '58.16.0.0', '58.24.0.0', '58.30.0.0', '58.32.0.0', '58.66.0.0', '58.68.128.0', '58.82.0 阅读全文
posted @ 2021-07-06 16:14 前方、有光 阅读(1225) 评论(0) 推荐(0)
摘要: 代码部署功能测试 部署功能测试代码,后端程序使用python3基于Django框架开发, 以pipenv作为包管理工具. .env 文件为项目环境变量配置文件 代码目录结构 ├── Dockerfile Dockerfile文件 ├── Pipfile 包管理文件 ├── Pipfile.lock 阅读全文
posted @ 2021-06-29 11:05 前方、有光 阅读(108) 评论(0) 推荐(0)
摘要: # def module_resolver(namespace): # namespace_parts = namespace.split(".") # module_name = ".".join(namespace_parts[0:-1]) # cls_name = namespace_part 阅读全文
posted @ 2021-05-31 11:59 前方、有光 阅读(69) 评论(0) 推荐(0)
摘要: # 质数因式分解 import math x = int(input("请输入一个大于10的整数:")) primes = [p for p in range(2, x // 2 + 1) if 0 not in [p % d for d in range(2, int(math.sqrt(p)) 阅读全文
posted @ 2021-05-28 11:15 前方、有光 阅读(423) 评论(0) 推荐(0)
摘要: root@iZm5e85x7l9b634qjg73hsZ:~# history 1 ls 2 sudo apt-get update 3 sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent softwar 阅读全文
posted @ 2021-05-26 10:17 前方、有光 阅读(187) 评论(0) 推荐(0)
摘要: 这个教程很详细 阅读全文
posted @ 2021-04-26 14:52 前方、有光 阅读(1064) 评论(0) 推荐(0)
摘要: package main import ( "github.com/gin-gonic/gin" "net/http" ) type UserInfo struct { Name string `json:"name"` Age int `json:"age"` Gender string `jso 阅读全文
posted @ 2021-04-13 15:54 前方、有光 阅读(168) 评论(0) 推荐(0)
摘要: # 系统默认模块# Create your tests here. import os import time def get_device(path="/mnt/data"): import os day = 7 disk = os.statvfs(path) disk_size = disk.f 阅读全文
posted @ 2021-04-02 12:31 前方、有光 阅读(890) 评论(1) 推荐(0)
摘要: 安装mongo docker run -itd --name mongo --restart=always -p 27017:27017 -v /mnt/data/mongo:/data/db mongo 拉取yapi镜像 docker pull registry.cn-hangzhou.aliyu 阅读全文
posted @ 2021-04-01 10:44 前方、有光 阅读(135) 评论(0) 推荐(0)
摘要: 不想写了。直接放个地址:https://www.5axxw.com/questions/content/vj8qft 阅读全文
posted @ 2021-02-24 16:32 前方、有光 阅读(87) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*- """ @author: Mr_zhang @software: PyCharm @file: wechat_pay.py @time: 2021/1/29 下午9:46 """ import hashlib import requests from 阅读全文
posted @ 2021-01-30 12:31 前方、有光 阅读(247) 评论(1) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 33 下一页