上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页
摘要: # -*- coding:UTF-8 -*- import json from collections import OrderedDict with open('dns_status.json','r') as f: data = json.load(f) import pandas as pd from datetime import datetime def datelist(... 阅读全文
posted @ 2017-11-01 15:28 明天OoO你好 阅读(11526) 评论(0) 推荐(0)
摘要: import pandas as pd from datetime import datetime def datelist(beginDate, endDate): # beginDate, endDate是形如‘20160601’的字符串或datetime格式 date_l=[datetime.strftime(x,'%Y-%m') for x in list(pd.date... 阅读全文
posted @ 2017-11-01 13:58 明天OoO你好 阅读(349) 评论(0) 推荐(0)
摘要: mailto = ['cc', 'bbbb', 'afa', 'sss', 'bbbb', 'cc', 'shafa'] addr_to = list(set(mailto)) addr_to.sort(key = mailto.index) 阅读全文
posted @ 2017-11-01 13:36 明天OoO你好 阅读(3498) 评论(2) 推荐(0)
摘要: 1 # -*- coding:UTF-8 -*- 2 import requests, time 3 import json 4 from bs4 import BeautifulSoup as bp 5 6 t3 = time.time() 7 ths = [] # 存放线程 8 9 10 def 阅读全文
posted @ 2017-11-01 10:35 明天OoO你好 阅读(392) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*- #python2.7 import sys reload(sys) sys.setdefaultencoding('utf-8') from pyexcel_xlsx import get_data import json alldata = [] def read_xlsx(): data = get_data('yingji.x... 阅读全文
posted @ 2017-09-25 14:37 明天OoO你好 阅读(4199) 评论(0) 推荐(0)
摘要: 一、安装pip install flask-wtf 二、创建一个flask的项目引入相对应的包 from flask import Flask,render_template import flask #引入模块 from flask_wtf import FlaskForm,CsrfProtect #如果输入的是字符串那么就用StringField,如果是整数那么就用IntegerFiel... 阅读全文
posted @ 2017-09-21 09:54 明天OoO你好 阅读(605) 评论(0) 推荐(0)
摘要: 1,在当前项目目录,从已有的分支创建新的分支(如从master分支),创建一个dev分支 git checkout -b dev 2,创建完可以查看一下,分支已经切换到dev git branch * dev master 3,提交该分支到远程仓库 git push origin dev 4,测试从 阅读全文
posted @ 2017-09-18 14:56 明天OoO你好 阅读(5140) 评论(0) 推荐(0)
摘要: from collections import defaultdict import json def tree(): return defaultdict(tree) categories = tree() a = categories['Programming Languages']['Python'] b = categories['Programming Languag... 阅读全文
posted @ 2017-08-17 18:18 明天OoO你好 阅读(831) 评论(0) 推荐(0)
摘要: 一、在提前加载js的地方写一段js,判断该页面是否需要添加ztree,我的项目所有提前加载的js都写在admin.js中 //增加ztree $(document).ready(function() { var t = $('#tree-style').text(); if(t.length>0){ $('#col').addClass('sevice-t... 阅读全文
posted @ 2017-08-17 18:09 明天OoO你好 阅读(1310) 评论(0) 推荐(0)
摘要: #!/usr/bin/python # -*- coding: utf-8 -* from fabric.api import * from fabric.contrib.files import * ## 需要注意的是,这里的host strings必须由username@host:port三部分构成,缺一不可,否则运行时还是会要求输入密码 env.hosts = [ 'root@2... 阅读全文
posted @ 2017-08-11 12:52 明天OoO你好 阅读(358) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 23 下一页