摘要: import threading import time import inspect import ctypes from queue import Queue class ThreadTTLMonitor(threading.Thread): def __init__(self, threads 阅读全文
posted @ 2021-03-05 11:36 士为知己 阅读(783) 评论(0) 推荐(0)
摘要: import threadpool import threading import time class FuncTTLMonitorDecorator(object): class _ResultThread(threading.Thread): def __init__(self, target 阅读全文
posted @ 2021-03-05 11:34 士为知己 阅读(404) 评论(0) 推荐(0)
摘要: 示例 import pandas as pd data_list = [ {'tier_1': 'alpha', 'tier_2': 'do', 'tier_3': 'copy', 'department': 'AAA'}, {'tier_1': 'alpha', 'tier_2': 'thing' 阅读全文
posted @ 2021-01-08 12:14 士为知己 阅读(455) 评论(0) 推荐(0)
摘要: helper.py 包含外键关联跳转、model对象拷贝、模型字段自定义校验的部分通用函数 from django.utils.safestring import mark_safe from copy import deepcopy from django.utils.translation im 阅读全文
posted @ 2021-01-08 10:36 士为知己 阅读(164) 评论(0) 推荐(0)
摘要: settings.py 配置以下变量,参与AD认证 AUTH_LDAP_SERVER_URI = 'ldap://10.108.198.6:389' AUTH_LDAP_BIND_DN = 'CN=test,OU=Service Accounts,DC=lenovo,dc=com' AUTH_LDA 阅读全文
posted @ 2021-01-07 17:55 士为知己 阅读(439) 评论(0) 推荐(0)
摘要: 内置函数相互转换: SELECT TO_DAYS('2021-01-01'); SELECT FROM_DAYS(738162); 创建分区表示例 CREATE TABLE IF NOT EXISTS `{tb_name}` ( `id` int(11) NOT NULL AUTO_INCREMEN 阅读全文
posted @ 2021-01-07 16:55 士为知己 阅读(536) 评论(0) 推荐(0)
摘要: 查询分区表 SELECT nmsp_parent.nspname AS parent_schema, parent.relname AS parent, nmsp_child.nspname AS child_schema, child.relname AS child, child.oid AS 阅读全文
posted @ 2021-01-07 15:52 士为知己 阅读(3434) 评论(0) 推荐(0)
摘要: wget https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tgz tar -xvzf Python-3.7.7.tgz cd Python-3.7.7 sudo su ./configure --prefix=/usr/local/pytho 阅读全文
posted @ 2021-01-07 12:00 士为知己 阅读(79) 评论(0) 推荐(0)
摘要: nginx.conf 包含子目录配置 # Load dynamic modules. See /usr/share/nginx/README.dynamic. include /usr/share/nginx/modules/*.conf; events { worker_connections 1 阅读全文
posted @ 2021-01-07 11:56 士为知己 阅读(103) 评论(0) 推荐(0)
摘要: 1 import time 2 import os 3 from pyvirtualdisplay import Display 4 from selenium import webdriver 5 6 DOMAIN = 'http://127.0.0.1:8000' # Use flask as 阅读全文
posted @ 2021-01-07 11:35 士为知己 阅读(615) 评论(0) 推荐(0)