- 博客(5)
- 收藏
- 关注
原创 Ansible Telnet连接插件
拓展ansible通过telnet方式连接远程设备执行命令并处理返回结果。 #!/usr/bin/env python2.7 # encoding: utf-8 from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ ...
2018-11-09 17:34:22
3079
原创 python ssh 连接交换机并执行命令并输出结果
# encoding=utf-8 import paramiko import time client = paramiko.SSHClient() client.load_system_host_keys() # connect to client client.connect('192.168.254.141',22,'test','test',allow_agent=False,look_...
2018-05-14 16:47:07
19774
3
原创 字典树简单实现
#coding=utf8 class TrieNode(object): def __init__(self): self.data = None self.is_word = False self.children = [] class Trie(object): def __init__(self):
2014-10-12 16:12:22
354
原创 最小编辑距离python实现
# -*- coding: cp936 -*- def edit(str1, str2): matrix = [[i+j for j in range(len(str2) + 1)] for i in range(len(str1) + 1)] for i in xrange(1,len(str1)+1): for j in xrange
2014-10-12 16:10:14
8048
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人