码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果)
python 语言函数类传参数的方式
# 来自 CAL 代码 # Main Run = ExptPeerRegC10CAL( {"--is_train": True, # why 居然可以这么写? "--is_plot_results": False, "--is_class_resolved": False, "--is_load": ...
分类:编程语言   时间:2021-05-03 12:12:19    阅读次数:0
Mysql权限整理
all privileges权限有哪些: select, insert, update, delete, create, drop,references, index,alter,create temporary tables,lock tables,execute,create view,show ...
分类:数据库   时间:2021-05-03 12:11:00    阅读次数:0
python multiprocessing卡住的1w种方法
CUDA not support fork os.register_at_fork进行清理锁操作(需要拿到锁,因此一般为库的作者使用,提高库的多进程兼容性) Fork VS Spawn Spawn的缺点 Guess import sys import multiprocessing as mp de ...
分类:编程语言   时间:2021-05-03 12:10:27    阅读次数:0
django.db.models.query.QuerySet格式的数据输出
1、 def findmtm2(request): import serializer import json # 多对多跨表正向查询 # res = softlist.objects.filter(hostlists__ip="10.116.6.177").values("softname") r ...
分类:数据库   时间:2021-05-03 11:51:42    阅读次数:0
python 同步本地库到pycharm中
利用pycharm创建一个新的工程, Files-Settings-Project-Project Interpreter 右上角设置中,选择Add,添加新的解释器。 apply之后,可以看到本地安装的库添加进工程内。 ...
分类:编程语言   时间:2021-04-30 12:44:52    阅读次数:0
序列化器
序列化:把python中的对象转成json格式字符串 反序列化:把json格式字符串转成python中的对象 drf的序列化组件(序列化器):把对象转成字典。因为有字典,直接丢到Response中就可以了 序列化器的使用 1 写一个序列化的类,继承Serializer 2 在类中写要序列化的字段 f ...
分类:其他好文   时间:2021-04-30 12:36:16    阅读次数:0
视图类
两个视图基类 1 APIView # 基础类 from rest_framework.views import APIView 2 GenericAPIView # 封装一些有关数据库操作 # GenericAPIView(APIView) from rest_framework.generics ...
分类:其他好文   时间:2021-04-30 12:36:05    阅读次数:0
python调用钉钉机器人发起通知
有时候需要做个某些服务的状态监控,用钉钉机器人发通知挺方便的。可以用shell脚本配合crontab检测状态,检测到异常就调用python脚本发起告警。 python内容 此处用的python3,需要先安装requests模块。pip install requests -i https://mirr ...
分类:编程语言   时间:2021-04-30 12:35:08    阅读次数:0
[ngx-formly] Use Angular Formly Extensions to automatically localize all field labels
In this lesson we're diving a bit deeper and learn how to inject services into Formly Extensions with the example of using ngx-translate to localize a ...
分类:其他好文   时间:2021-04-30 12:28:57    阅读次数:0
Ubuntu中virtual enviroment在sudo下无效怎么办?
背景 创建了virtual environment,但是在sudo下却无效,提示找不到包,然而这个包其实安装过了。 解决办法 直接使用venv下python的绝对路径, sudo 你自己的虚拟环境目录/bin/python hello.py 例如 sudo /home/wlg/venv/bin/py ...
分类:系统相关   时间:2021-04-30 12:26:45    阅读次数:0
共160304条   上一页 1 ... 78 79 80 81 82 ... 16031 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!