Time of Update: 2016-12-08
標籤:odi app 字串 saas asa sorted list [] while ##統計word中的各個字元的出現的次數,並統計出所有前十名的字元使用次數# -*-
Time of Update: 2016-12-09
標籤:python get請求 網站是在vmware虛擬機器裡搭了一個Tomcat的jspgou網站。650) this.width=650;" src="http://s5.51cto.com/wyfs02/M01/8B/47/wKioL1hI-3DhmrqXAAEgJ88t1lw365.png-wh_500x0-wm_3-wmp_4-s_121200361.png" title="11.png" alt="wKioL1hI-3DhmrqXAAEgJ88t1lw365.png-wh_
Time of Update: 2016-12-08
標籤:需要 except 報錯 tcp name mac smtp put cnn 一、socket文法 網路七層模型(OSI模型)
Time of Update: 2016-12-08
標籤:點贊 end html4 contract html elf gre round val <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Time of Update: 2016-12-07
標籤:下一步 rom cat path 內容 遞迴迴圈 解析 迴圈 ges 之前看過用Scrapy 架構建立項目爬取 網頁解析時候用的Xpath進行解析的網頁元素
Time of Update: 2016-12-08
標籤:結構 add ted property 定義類 __init__ import write 代碼 抽象類別:
Time of Update: 2016-12-07
標籤:mos end start while bre ace 開始 last one 1、當有多個條件是用 elif 這樣就不用那麼多縮排score = int(input(‘輸入一個分數‘))
Time of Update: 2016-12-07
標籤:assign bsp init space 尋找 ssi python
Time of Update: 2016-12-07
標籤:資料 測試案例 import 技術分享 技術 ssi index 變數 geo 一直覺得自己的部落格太簡單了,今天想加點功能上去,說幹就幹,準備加個最常用的,天氣預報功能。看了幾個例子,覺
Time of Update: 2016-12-07
標籤:linux basics1. who | cut -d‘‘ -f1 | sort -u2.cut -d: -f7 /etc/passwd | uniq -c | sort -rn | head -n -1 3.sort -t: -k3 -n /etc/passwd |tail -n -10 | tr‘a-z‘ ‘A-Z‘ > tmp/maxusers.txt4.ifconfig | head -n -2 | tail -n -1 | cut -d: -f2 |
Time of Update: 2016-12-08
在python中:1. 串連:Python代碼 import mysql.connector cnx = mysql.connector.connect(user='scott', password='tiger', host='127.0.0.1', database='employees') cnx.
Time of Update: 2016-12-08
#!/usr/bin/env python #site www.jbxue.com # # -*- coding: utf-8 -*- from bisect import bisect _LIST1, _LIST2 = [], [] _INIT = False ip2int = lambda ip_str: reduce(lambda a, b: (a << 8) + b, [int(i) for i in ip_str.split('.
Time of Update: 2016-12-08
字串相關操作:+ :string1+string2 #聯結字串,將後一個串連結到前一個串的後面* :string*n #建立一個新字串重複n次原來的串[] :string[n] #從字串中擷取對應位置的一個字元[:] :string[n:m] #截取字串,如果為:m從頭到m如果為n:從n到尾in :char in string #判斷一個字元是否在串中,如果在返回為真(True)not in :char not in string #判斷一個字元是否不在串中,如果在返回為真(True)r/R :
Time of Update: 2016-12-08
Python一切皆對象(object),每個對象都可能有多個屬性(attribute)。Python的屬性有一套統一的管理方案。對象的屬性可能來自於其類定義,叫做類屬性(class attribute)。類屬性可能來自類定義自身,也可能根據類定義繼承來的。一個對象的屬性還可能是該對象執行個體定義的,叫做對象屬性(object
Time of Update: 2016-12-08
python 發郵件 # Import smtplib for the actual sending functionimport smtplib# Import the email modules we'll needfrom email.mime.text import MIMEText# Open a plain text file for reading. For this example, assume that# the text file contains only
Time of Update: 2016-12-07
最近在學習python,對於一個c系列語言深度中毒的人來說很多問題需要拋棄舊的認識並重新理解#coding=utf-8global n, m, k, edge, head, dis, stack, vis, nMax, mMax, infnMax = 100mMax = 10000inf = 1e+10class e(object): passn = 0k = 0m = 0eg = e()edge = []head = [0]dis = [0]stack = [0]vis =
Time of Update: 2016-12-07
直接貼自己寫的代碼做參考:#encoding=utf-8__author__ = 'Administrator'# 類的定義# **kw 在建立類的執行個體對象的時候動態給對象添加參數class Person(object): def __init__(self,name,age,**kw): ##每個類都有個init 方法 self.name = name self.age = age for k,v in
Time of Update: 2016-12-07
擷取目前時間:Python代碼 import time print time.time() #擷取目前時間 print time.strftime("%Y-%m-%d %X ") #擷取目前時間(按照指定格式) 用time.localtime()方法,作用是格式化時間戳記為本地的時間:Python代碼 import time print time.localtime(time.time())
Time of Update: 2016-12-09
Python學習筆記(一)——環境搭建,python學習筆記一、安裝包下載: 國內鏡像:32位:http://pan.baidu.com/s/1jI4q4lS 64位:http://pan.baidu.com/s/1eRPhpRW 版本更迭速度很快,最好選擇官網下載最新版本 二、Python安裝 &
Time of Update: 2016-12-09
Python學習筆記(二)——HelloWorld,pythonhelloworld一、互動式化環境下書寫代碼 二、使用文字編輯器編輯.py檔案1、建議,使用Nodepad++,好看,免費,度娘直接搜素即可。2、編寫代碼3、儲存為.py結尾的檔案4、使用cmd,開啟到檔案所在目錄(cd),然後運行5、直接運行py檔案 在Windows上是不行的,但是,在Mac和Linux上是可以的,方法是在.py檔案的第一行加上一個特殊的注釋:#!/usr/bin/