自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(97)
  • 资源 (2)
  • 收藏
  • 关注

原创 Django models使用

github地址: https://github.com/mqaaa

2018-09-09 15:22:23 378

原创 Beego-ROUTER Beego-ROUTER

对GOPATH的配置 其实GOPATH可以使用多个路径 用来区别GOPATH的插件和开发 eg:/Users/Z/develop/gopath:/Users/Z/Dropbox/gopathBeego的几个重要功能new Creates a Beego applicationrun Run the application by starting a local developme...

2018-07-22 15:13:57 1134

原创 Go-语言特性

天然并发从语言层面支持并发,goroute,轻量级线程基于CSP模拟实现channel管道,类似于linux的pipe多个goroute之间通过channel进行通信支持任何类型管道func test_pipr() { //管道放入数据 pipe := make(chan int,3) pipe <- 1 pipe &l...

2018-05-15 21:43:28 344

原创 软考数据库

SQL中 名称 功能 union 并集(带有去重功能), union all 并集(不去重功能), EXCEPT (差集) INTERSECT (交集)使用方法为表创建聚簇索引,是对数据库的内模式进行修改 ACID 原子性 事务被完整的执行或者不执行 一致性 数据库中的数据与现实...

2018-05-14 22:41:02 3206

原创 初识Go

命令行go run go build基础结构//程序所属包package main//导入依赖包import "fmt"//常量定义const NAME string = "孟祺"//全局变量的声明和赋值var age int = 21//一般类型声明type Imooc int//声明结构体type Learn struct {}//声明接口...

2018-05-14 21:26:42 293

原创 Git基础用法

1. 什么是Git?2. 理解版本管理的流程3. Git初始设定4. 第一次提交(commit)5. 查看提交履历6. 把握Git状态7. 比较修改内容8. Git文件操作9. Git忽略管理10. 更新最后的提交11. 返回过去112. 返回过去213. 使用分支14. 合并分支15. 制造分支冲突16. 解决分支冲突17. 使用Tag标签18. 使用别名19...

2018-05-06 17:25:48 365

原创 Python自动化管理

使用paramiko(python内嵌的SSHClient和SFTPClient)import paramikossh = paramiko.SSHClient()ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())ssh.connect('120.24.222.231',22,'root','*****')stdin,st...

2018-05-04 20:26:28 669

原创 dstat和glances用法总结

多功能系统资源统计工具——dstat综合了vmstat,iostat,ifstat,netstat等工具的功能实时显示监控数据在做问题分析和故障排查的时候,可以监控最重要的计数器,也可以针对计数器进行排序。模块化设计使用Python语言编写,更方便拓展现有的工作任务容易扩展,便于添加自定义计算器包含许多的扩展插件可以分组统计快设备,网络设备,并给出汇总信息可以显示每台设备的中...

2018-04-30 18:13:17 716

原创 Python处理文件——os模块,shutil模块

os以及os.path的基础函数 函数 解释 举例 os.listdir() 列出文件 os.path.split() 将文件拆分成数组 In [33]: os.path.split(‘/root/python/test/1.txt’) Out[33]: (‘/root/python/test’, ‘1.txt’) os.path.j...

2018-04-27 14:14:49 482

原创 Python re(正则)处理

编译正则和非编译正则在使用编译正则的时候,系统不需要反复解读你的正则表达式,故而速度更快。通识的说,就是编译性程序和解释性程序的速度差别也是这个原因test_re_nocompile.py#!/usr/bin/python# _*_ codeing: UTF-8 _*_from __future__ import print_functionimport reimp...

2018-04-25 20:33:49 311

原创 Python运维——系统模块

psutil模块psutil 是一个跨平台的库,提供了查看系统各项参数的接口。 常用方法: 方法 解释 cpu-count() cpu逻辑个数 cpu_count(logical=False) cpu_percent() CPU的使用率 virtual_memory() 内存完整信息 disk_partitions(...

2018-04-24 17:23:22 507

原创 shell(二)

read 命令[root@iZtoz99sjuwqcnZ test]# read a b c1 2 3[root@iZtoz99sjuwqcnZ test]# a-bash: a: command not found[root@iZtoz99sjuwqcnZ test]# $a-bash: 1: command not found[root@iZtoz99sjuwqcnZ te...

2018-04-19 22:19:05 225

原创 shell变量的使用

单引号和双引号的区别单引号之间的内容原封不动的指定给了变量。双引号取消了空格的作用,特殊符号的含义保留。删除变量unset $NAME 过滤$NAME 及 set | grep NAME位置变量和特殊变量位置变量:Shell 解释执行用户命令时,将命令行的第一个字作为命令名,而其他字作为参数。由出现再命令行上的位置确定的参数成为位置参数。特殊变量:有些变量是一开...

2018-04-19 20:29:32 198

原创 美团点评2017秋招笔试真题-运维工程师——小结

基础知识端口号与其对应的服务 端口号 TCP/UDP 服务 20 /tcp FTP数据 21 /tcp FTP控制 文件传输协议 22 /tcp SSH 安全登录、文件传送(SCP)和端口重定向 23 /tcp Telnet 不安全的文本传送 25 /tcp SMTP 简单邮件传输协议(S...

2018-03-22 10:42:15 1142

原创 C++随笔

函数 头文件 用法 作用 sqrt cmath sqrt(double) 开平方 reverse algorithm reverse(v.begin(),v.end()) 反转字符串 pow cmath pow(double,double) 幂 ostringstream stream sstream...

2018-03-11 16:02:21 237

原创 1066. Root of AVL Tree (25)(平衡二叉树)

1066. Root of AVL Tree (25)An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ b...

2018-03-06 09:29:47 339

原创 127. ZigZagging on a Tree (30)

127. ZigZagging on a Tree (30)Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder and inorder traversal seq...

2018-03-05 00:13:30 411

原创 1064. Complete Binary Search Tree (30)(重点复习)

1064. Complete Binary Search Tree (30)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys...

2018-03-05 00:08:43 633

原创 1099. Build A Binary Search Tree (30)

1099. Build A Binary Search Tree (30)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys ...

2018-03-05 00:03:00 283

原创 1043. Is It a Binary Search Tree (25)

1043. Is It a Binary Search Tree (25)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys ...

2018-03-04 00:26:06 649 2

原创 1086. Tree Traversals Again (25)

1086. Tree Traversals Again (25)An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node binary tree (with the keys numbered f...

2018-03-01 19:33:53 252

原创 1020. Tree Traversals (25)

1020. Tree Traversals (25)Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order t...

2018-03-01 15:05:00 229

原创 阿里云ACA学习笔记

阿里云概述阿里云:构建下一代信息经济基础设施强大的基础设施。阿里云特点规模最大的集群 多运营商BGP接入 最优质的CDN网络阿里云设计理念:大规模效应降低成本 多地域、多可用容灾 服务化方式开放 通用解决方案和行业解决方案阿里云基础引用架构建议前台逻辑:SLB——负载均衡,流量入口 ECS——运行应用,高可用, 机构化数据类型:云RD...

2018-02-28 11:29:29 13740 4

原创 Python学习笔记(十七)——用GUI自动化控制键盘鼠标

安装pyautogui模块在Windows上不需要安装其他模块在OS X上,运行 sudo pip3 install pyobjc-framework-Quartz sudu pip3 install pyobhc-core sudo pip3 install pyobjc在linux上运行, sudo pip3 install python3-xlib, sudo apt-g...

2018-02-19 23:35:24 2157

原创 Python学习笔记(十六)——操作图像

计算机图像基础颜色和RGBA值>>> from PIL import ImageColor>>> ImageColor.getcolor<function getcolor at 0x0000022E2FDE5598>>>> ImageColor.getcolor('red','RGBA')(255, 0, 0,...

2018-02-19 18:06:41 3613

原创 Python学习笔记(十五)——自动发送对应邮件(表格与邮件)练习

从Excel 电子表格中读取数据。找出上个月没有交费的所有会员。找到他们的电子邮件地址,向他们发送针对个人的提醒。这意味着代码需要做到以下几点:用openpyxl 模块打开并读取Excel 文档的单元格(处理Excel 文件参煤创建一个字典,包含会费超期的会员。调用smtplib.SMTP()、ehlo()、starttls()和login(),登录SMTP 服务器,针...

2018-02-15 17:44:05 2078

原创 Python学习笔记(十四)——发送电子邮件和短信

SMTP#-*- encoding: utf-8 -*-import os, sysimport smtplibfrom smtplib import SMTP_SSLfrom email.header import Headerfrom email.mime.text import MIMETextmailInfo = { "from": "15735184252@...

2018-02-14 12:11:47 2157

原创 Python学习笔记(十三)——保持时间、计划任务和启动程序以及多线程

time模块time.time()函数>>> import time>>> time.time()1518508607.2039714计算程序的运行时间import timedef func(): p = 1 for i in range(1,100000): p = p * i return p...

2018-02-13 23:19:29 1512

原创 Python学习笔记(十二)——处理CSV文件和JSON数据

CSVReader对象>>> import csv>>> exampleFile = open('example.csv')>>> exampleReader = csv.reader(exampleFile)>>> exampleReader<_csv.reader object at 0x00...

2018-02-12 16:10:31 438

原创 Python学习笔记(十一)——处理PDF密码破解

#! python3#UnlockPDF.py - #Usage:##Author : qmeng#MailTo : [email protected]#QQ : 1163306125#Blog : http://blog.csdn.net/Mq_Go/#Create : 2018-02-11 11:02:32#Version: 1.0#import PyPDF2...

2018-02-11 21:22:33 7269 2

原创 Python学习笔记(十)——处理Excel电子表格

LibreOffice Apache OpenOffice安装openpyxl模块pip install openpyxlopenpyxl使用手册读取Excel文件用openpyxl模块打开Excel文档>>> wb = openpyxl.load_workbook('temp.xlsx')>>> type(wb)...

2018-02-09 23:47:23 7496

原创 Python学习笔记(九)——使用selenium模块

准备工作在Python3.6版本之后,在selenium和firefox有些不兼容 如果你出现的这样的错误`>>> browser = webdriver.Firefox('C:\\Program Files (x86)\\Mozilla Firefox')Traceback (most recent call last): File "C:\Users\lx...

2018-02-09 14:24:40 1577

原创 Python学习笔记(八)——从Web抓取信息

小实验——利用webbrowser模块的mapIt.py>>> import webbrowser>>> webbrowser.open('http://www.baidu.com')弄清楚URLhttp://news.baidu.com/ns?word=搜索内容 https://www.baidu.com/s?wd='+address ...

2018-02-07 23:50:26 1716 2

原创 Python学习笔记(七)——调试

抛出异常>>> raise Exception('This is the error message')Traceback (most recent call last): File "", line 1, in raise Exception('This is the error message')Exception: This is the error message

2018-02-07 18:12:39 424

原创 Python学习笔记(六)——组织文件

shutil模块在Python程序中复制移动改名和删除文件复制文件和文件夹>>> shutil.copy('def.py','.\\test')'.\\test\\def.py'>>> os.listdir('.\\test')['def.py']在复制的时候为新复制的文件命名>>> shutil.copy('def.py','.\\test\\def2.py

2018-02-06 17:52:00 864

原创 Python学习笔记(五)——读写文件

文件与文件路径window上的 ‘\’ 和 Linux与OS X 上的 ‘/’window上的路径为:C:/Python/Python37/phoneAndEmail.py OS X 和 Linux上的路径为: usr/bin/spam 所以如果要使你的Python程序在各种系统上通用,在涉及文件目录的情况下可以使用os.path.join() ,这个函数会自动根据系统进行匹配

2018-02-05 17:53:13 874

原创 Python学习笔记(四)——模式匹配与正则表达式

正则创建正则表达对象>>> import re查找段落中的电话号码 ‘xxx-xxx-xxxx’ \d 表示一个数字字符 re.compile() 传递原始字符串phoneNumRegex = re.compile(r'\d{3}-\d{3}-\d{4}')匹配Regex对象>>> import re>>> phoneNumRegex = re.c

2018-02-03 23:28:46 657

原创 Python学习笔记(三)——字符串操作

字符串字面量双引号>>> spam = "This is Tom' cat">>> spam"This is Tom' cat"转义字符>>> print('\',\",\t,\n,\\')',", ,,\原始字符串在引号之前加上r,使他成为原始字>>> print(r'That is Carol\' cat')That is C

2018-02-03 18:22:55 1013

原创 Python学习笔记(二)——字典和结构化数据

字典数据类型>>> mycat = {'size':'fat','color':'gray','disposition':'loud'}>>> mycat{'size': 'fat', 'color': 'gray', 'disposition': 'loud'}>>> mycat['size']'fat'>>> spam = {123:'hello',456:'word'}>

2018-02-02 00:06:06 696

原创 Python学习笔记(一)——列表

列表一个数组中可以有字符串,也可以有数字>>> spam = [['cat','bat'],[10,20,30]]>>> spam[1][10, 20, 30]>>> spam[0]['cat', 'bat']>>> spam[0][0]'cat'>>> spam[1][0]10>>> spam[0][0][0]'c'>>> spam[1][1][1]Traceba

2018-01-31 17:01:38 372

某互联网创业公司 公司网络规划及实施(试题).pkt

某互联网创业公司 公司网络规划及实施

2017-07-21

php基本函数

PHP中基本的对字符串、数组、以及数学公式

2017-05-10

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除