http://wangwei007.blog.51cto.com/68019/1106735检查Linux系统日志error和mysql错误日志的脚本http://wangwei007.blog.51cto.com/68019/1102836picklehttp://wangwei007.blog.51cto.com/68019/1045577python用zipfile模块打包文件或是目录、解压zip文件实例http://blog.163.co..
分类:
编程语言 时间:
2014-05-27 04:14:22
阅读次数:
434
一、Cobbler简介Cobbler是一个快速网络安装linux的服务,而且在经过调整也可以支持网络安装windows。该工具使用python开发,小巧轻便(才15k行python代码),使用简单的命令即可完成PXE网络安装环境的配置,同时还可以管理DHCP、DNS、yum仓库、构造系统ISO镜像。Cobbler支持命..
分类:
其他好文 时间:
2014-05-27 03:58:04
阅读次数:
399
#!/bin/bash
process=8
PWD=`pwd`
DAT=`date`
ftpip="192.168.1.1"
user="ftp_username"
password="ftp_password"
local_dir="/home/"
getlist()
{
ftp-n$ftpip<<EOF|awk‘{print$9}‘|sed‘/^$/d‘>$PWD/list
user$user$password
cdfile/
dir
bye
EOF
}
copy()
{
if[-f$P..
分类:
系统相关 时间:
2014-05-27 03:55:34
阅读次数:
378
#!/usr/bin/python
#-*-coding:utf-8-*-
importparamiko,os,datetime
server_ip=‘192.168.1.123‘
server_user=‘root‘
server_passwd=‘10241010‘
server_port=22
#local_dir=‘C:\Python27‘
#remote_dir=‘/soft2/nba/‘
defssh_connect():
ssh=paramiko.SSHClient()
ssh.set_missi..
分类:
编程语言 时间:
2014-05-27 03:51:40
阅读次数:
283
/*【程序9】
题目:一个数如果恰好等于它的因子之和,这个数就称为"完数"。例如6=1+2+3.编程找出1000以内的所有完数。*/
packagetest;
importjava.util.ArrayList;
importjava.util.List;
publicclasstest{
publicstaticbooleanovernum(intnumber){
List<Integer>list=..
分类:
编程语言 时间:
2014-05-27 03:34:38
阅读次数:
245
/*【程序7】
题目:输入一行字符,分别统计出其中英文字母、空格、数字和其它字符的个数。
1.程序分析:利用while语句,条件为输入的字符不为‘\n‘.*/
packagetest;
importjava.util.ArrayList;
importjava.util.List;
publicclasstest{
publicstaticList<Integer>countstr..
分类:
编程语言 时间:
2014-05-27 03:32:01
阅读次数:
375
在使用相关新闻资讯的APP过程中间,发现有些不满意的地方,结合之前工作积攒的知识和基于个人兴趣,准备实现个简单的新闻资讯阅读系统,主要用来验证自己的想法和相关的算法...
分类:
其他好文 时间:
2014-05-22 12:23:54
阅读次数:
323
python中使用正则表达式
1. 匹配字符
正则表达式中的元字符有 . ^ $ * + ? { } [ ] \ | ( )
匹配字符用的模式有
\d 匹配任意数字
\D 匹配任意非数字
\s 匹配任意空白字符
\S 匹配任意非空格字符
\w 匹配任意数字或者字母
\W 匹配任意非数字或者字母
2. 正则表达式
python中使用compile处...
分类:
编程语言 时间:
2014-05-22 11:33:49
阅读次数:
294
5道题目分别是:【Combinations】、【Search a 2D Matrix】、【Scramble String 】、【Rotate List 】、【Partition List】,由于有一些题目不需要发一整篇博文来记录,所以就将这些题目以一篇博文5道来记录。...
分类:
其他好文 时间:
2014-05-20 15:36:16
阅读次数:
293