09 2017 档案

python构建一个项目
摘要:二、实验步骤 2.1 实验准备 我们的实验项目名为 factorial。 2.2 主代码 我们给将要创建的 Python 模块取名为 myfact,因此我们下一步创建 myfact 目录。 主代码将在 fact.py 文件里面。 我们还有模块的 __init__.py 文件,内容如下: 我们还在 f 阅读全文

posted @ 2017-09-14 11:38 Jt00 阅读(2596) 评论(0) 推荐(0)

装饰器函数和装饰器类
摘要:1.装饰器函数就是把函数作为参数传给一个函数 阅读全文

posted @ 2017-09-14 09:51 Jt00 阅读(247) 评论(0) 推荐(0)

python监控服务器
摘要:import paramikoimport threadingimport reimport timeimport stringfrom sendmail import send_maildef ssh2(ip,username,passwd,cmd): try: ssh = paramiko.SSHClient() ssh.set_missing_host_ke... 阅读全文

posted @ 2017-09-12 12:36 Jt00 阅读(352) 评论(0) 推荐(0)

Python发送邮件(支持中文)
摘要:qq邮箱收到了,打算把系统用python监控起来 [root@falcon Web-Monitoring-multi-thread]# cat testa.py#! /usr/bin/env python# -*- coding: UTF-8 -*-import smtplibfrom email. 阅读全文

posted @ 2017-09-08 17:08 Jt00 阅读(839) 评论(0) 推荐(0)

tcp/ip网络协议学习
摘要:链路层介绍 网络层协议的数据单元是 IP 数据报 ,而数据链路层的工作就是把网络层交下来的 IP 数据报 封装为 帧(frame)发送到链路上,以及把接收到的帧中的数据取出并上交给网络层。 以太网 以太网(Ether-net)是指 DEC 公司、Intel 公司和 Xerox 公司在 1982 年联 阅读全文

posted @ 2017-09-08 11:16 Jt00 阅读(281) 评论(0) 推荐(0)

sql mysql
摘要:日期计算 MySQL 有用来计算日期的函数,比如计算年龄或提取日期部分。 要想确定每个宠物有多大,可以使用函数TIMESTAMPDIFF()计算当前日期的年和出生日期之间的差也可以按照直接使用语句(YEAR(CURDATE())-YEAR(birth))计算,其中函数CURDATE()是计算当前的日 阅读全文

posted @ 2017-09-07 11:47 Jt00 阅读(276) 评论(0) 推荐(0)

sql练习
摘要:shiyanlou:~/ $ git clone https://github.com/shiyanlou/SQL4 [15:06:24]Cloning into 'SQL4'...remote: Counting objects: 9, done.remote: Compressing objec 阅读全文

posted @ 2017-09-06 15:42 Jt00 阅读(208) 评论(0) 推荐(0)

导航