Python2.7使用enum报错解决方法
from enum import Enum type object has no attribute ‘getitem‘ #如果已经安装过enum #使用pip uninstall enum #然后 pip install enum34
from enum import Enum type object has no attribute ‘getitem‘ #如果已经安装过enum #使用pip uninstall enum #然后 pip install enum34
#!/bin/sh if [[ $# -ne 1 ]] then echo "Usage: chpw.sh password" exit 1 fi passwd=$1 echo "${passwd}" | passwd … 阅读全文
select table_name,table_rows from information_schema.tables where TABLE_SCHEMA = ‘数据库名称’ order by table_rows desc; select sum(tabl … 阅读全文
def Ip2long(ip_str): ”’把字符串形式的IP地址转换成long int 形式”’ ips=ip_str.split(‘.’) ip_long=int(ips[3])+int(ips[2])*256+int(ips[1])*(256**2 … 阅读全文
SELECT table_name AS “Tables”, round(((data_length + index_length) / 1024 / 1024), 2) “Size in MB” FROM information_schema.TAB … 阅读全文
Android平台云端打包使用的DCloud公用证书 http://ask.dcloud.net.cn/article/68 HBuilder|HBuilderX应用云端打包Android平台默认使用的DCloud公用证书,其信息如下: MD5: 59:20: … 阅读全文
#! /usr/bin/env python #coding=utf-8 import ctypes,sys STD_INPUT_HANDLE = -10 STD_OUTPUT_HANDLE = -11 STD_ERROR_HANDLE = -12 # 字体颜 … 阅读全文
#-*-coding:utf-8-*- import threading import time import inspect import ctypes def _async_raise(tid, exctype): “””raises the except … 阅读全文
#!/bin/bash #访问日志存放目录 LOGS_PATH=”/usr/local/nginx/log/” #创建存放分割后的目录,目录以年/月命名 mkdir -p ${logs_path}$(date -d “yesterday” +”%Y”)/$(d … 阅读全文
####把本地/root dao ./bak/cacti-net-bak 下#### #!/bin/bash filename=”`date +%F`.xlsx” ftp -n<<! open IP user 用户 密码 binary hash c … 阅读全文