原创 python--php 比較

 類: PHP: class spc_core { public $var1; private $var2; protected $var3; public function __construct($v1,$v2){ $

原创 python 實現ha記錄秒添加

思路分析:ha記錄的添加規則已經固定那我只要在haproxy.cfg裏,指定的位置加上標誌。用python讀於配置文件,在標誌的位置,插入數據就可以了。爲什麼不用的shell?爲了嘗試下python import sys#####get i

原创 python之string

 在 編程中,幾乎90% 以上的代碼都是關於整數或字符串操作,所以與整數一樣,Python 的字符串實現也使用了許多拿優化技術,使得字符串的性能達到極致。與 C++ 標準庫(STL)中的 std::string 不同,python 字符串集

原创 Python list 操作

 創建列表 sample_list = ['a',1,('a','b')] Python 列表操作 sample_list = ['a','b',0,1,3] 得到列表中的某一個值 value_start = sample_l

原创 play01-Getting started-Installing Play

https://www.playframework.com/documentation/2.6.x/HomeGetting started https://www.playframework.com/documentation/2.6.x/

原创 python ImportError: No module named paramiko

 >>> import paramiko Traceback (most recent call last): File "<stdin>", line 1, in <module> python ImportError: No mo

原创 實現MySQL允許遠程連接

 1、進入MySQL,創建一個新用戶root,密碼爲root:格式:grant 權限 on 數據庫名.表名 to 用戶@登錄主機 identified by "用戶密碼"; 1. grant select,update,insert,d

原创 python 多線程檢測同網段主機在線狀態

 # -*- coding: utf-8 -*- #code by scpman #http://www.scpman.com import threading from time import sleep,ctime def p

原创 mysql中kill掉所有鎖表的進程

 mysql>show processlist; 出來嘩啦啦好幾屏幕的, 沒有一千也有幾百條, 查詢語句把表鎖住了, 趕緊找出第一個Locked的thread_id, 在mysql的shell裏面執行. mysql>kill thread_