Time of Update: 2016-10-31
標籤:and 資料 commit getcwd getc exec scrapy set task 1 #-*-coding:utf8-*- 2 #此處調試代碼... 3 import
Time of Update: 2016-10-31
標籤:element 沒有 bsp ini turn code self efi nod # Definition for singly-linked list.# class
Time of Update: 2016-10-31
標籤:blog highlight name des txt 之間 close path min 練習一:打出1-100之間的所有偶數def even_print(): for i
Time of Update: 2016-11-01
標籤:定義 call code 存在 基類 most oss 注意 ret Python
Time of Update: 2016-10-29
標籤:range https int net print 題目 log 計算 break 本題來自 Project Euler
Time of Update: 2016-10-31
標籤:info form 記憶體位址 oba 而在 字母 決定 val format 字典查詢快的原因字元編碼函數定義局部變數、全域變數傳回值嵌套函數遞迴(二分尋找)三元運算maplamba函數
Time of Update: 2016-10-30
標籤:列印 是什麼 int str nbsp 格式化輸出 div pytho style 1 #!/usr/bin/env python 2 #encoding: utf-8 3
Time of Update: 2016-10-29
標籤:bsp uil log function 全域變數 define current led ret 英文文檔:globals()Return a dictionary
Time of Update: 2016-10-30
標籤:bash nes doc query examples mode shel dfa ams (1)
Time of Update: 2016-11-01
Python中的閉包不是一個一說就能明白的概念,但是隨著你往學習的深入,無論如何你都需要去瞭解這麼一個東西。閉包的概念我們嘗試從概念上去理解一下閉包。在一些語言中,在函數中可以(嵌套)定義另一個函數時,如果內部的函數引用了外部的函數的變數,則可能產生閉包。閉包可以用來在一個函數與一組“私人”變數之間建立關聯關係。在給定函數被多次調用的過程中,這些私人變數能夠保持其持久性。—— 維基百科)用比較容易懂的人話說,就是當某個函數被當成對象返回時,夾帶了外部變數,就形成了一個閉包。看例子。def
Time of Update: 2016-10-31
英文文檔:help([object])Invoke the built-in help system. (This function is intended for interactive use.) If no argument is given, the interactive help system starts on the interpreter console. If the argument is a string, then the string is looked up as
Time of Update: 2016-10-31
Linux系統下安裝MySQL的步驟詳解本文介紹的是linux系統下使用官方編譯好的二進位檔案進行安裝MySql的安裝過程和安裝截屏,這種安裝方式速度快,安裝步驟簡單!如下是我工作中的記錄,介紹的是linux系統下使用官方編譯好的二進位檔案進行安裝MySql的安裝過程和安裝截屏,這種安裝方式速度快,安裝步驟簡單!需要的朋友可以按照如下步驟進行安裝,可以快速安裝MySql,希望可以協助大家:)!1、下載mysql的linux版本的二進位安裝包:地址:http://dev.mysql.com/dow
Time of Update: 2016-10-29
實驗室這段時間要採集電影的資訊,給出了一個很大的資料集,資料集包含了4000多個電影名,需要我寫一個爬蟲來爬取電影名對應的電影資訊。 其實在實際運作中,根本就不需要爬蟲,只需要一點簡單的Python基礎就可以了。
Time of Update: 2016-10-31
python之檔案,檔案開啟函數:f = open 表1-1:open函數中模式參數常用值開啟模式描述‘r’讀模式‘w’寫入模式‘a’追加模式‘b’二進位模式‘+‘讀/寫入模式
Time of Update: 2016-10-31
python雜記-3(購買商品),python-3#!/usr/bin/env python# -*- coding: utf-8 -*-#如下是一個購物程式:#先輸入工資,顯示商品列表,購買,quit退出,最後格式化輸出所買的商品。count = 0while True: #做一個迴圈判斷,如果輸入的不是數字,基於提示,三次後退出 salary = input("input your salary:") #輸入你的工資 if salary.isdigit():
Time of Update: 2016-10-31
Python開發程式:學員管理系統(mysql),pythonmysql主題:學員管理系統需求:使用者角色,講師\學員, 使用者登陸後根據角色不同,能做的事情不同,分別如下講師視圖: 管理班級,可建立班級,根據學員qq號把學員加入班級 可建立指定班級的上課紀錄,注意一節上課紀錄對應多條學員的上課紀錄, 即每節課都有整班學員上, 為了紀錄每位學員的學習成績,需在建立每節上課紀錄是,同時為這個班的每位學員建立一條上課紀錄 為學員批改成績,
Time of Update: 2016-10-29
python爬取糗百第一頁的笑話,python第一頁笑話自學python網路爬蟲,發現request比urllib還是要好用一些,因此利用request和BeautifulSoup來實現糗百的首頁笑話的抓取。BeautifulSoup通過find和findAll以及利用Regex實現HTML對應模組的抓取,當然select也是一個不錯的選擇。下面是臨時的代碼,後續還會繼續完善。 1 # coding=utf-8 2 import requests 3 from bs4 import
Time of Update: 2016-10-29
Python內建函數(24)——frozenset,pythonfrozenset英文文檔:class frozenset([iterable])Return a new frozenset object, optionally with elements taken from iterable. frozenset is a built-in class. See frozenset and Set Types — set, frozenset for documentation about
Time of Update: 2016-10-31
python雜記-1,python雜記os模組說明:python os模組包含普遍的作業系統功能os.access(path, mode) # 檢驗許可權模式 os.chdir(path) # 改變當前工作目錄os.chflags(path, flags) # 設定路徑的標記為數字標記。os.chmod(path, mode) # 更改許可權os.chown(path, uid, gid) #
Time of Update: 2016-10-29
Python 2.7的安裝(64位win10),pythonwin10Python 2.7.12:https://www.python.org/downloads/release/python-2712/安裝路徑D:\Program Files\Python27python環境安裝比較簡單,下載python語言環境中的windows版本的msi格式檔案,下載後雙擊安裝即可。在安裝時選擇添加路徑到系統中,則環境變數Path中已經自動添加python安裝的路徑D:\Program