原创 概率論入門之一

概率論系列主要是記錄學習MIT 的Introduction to Probability and Statistics 的學習筆記。按章節安排來分開我的博客內容。 Introduction Probability vs Stati

原创 Python 時間,日期,時間戳(一)

Python 時間,日期,時間戳(一) python time模塊中的函數調用了運行平臺中的C語言庫,因此一些函數的語義和細節定義(例如epoch的起始以及支持的最大值等)是與平臺相關的。 Python time模塊 術語解釋:

原创 Python中的變量、引用和作用域

Python中的變量、引用和作用域 可變對象 & 不可變對象 在python中,對象分爲兩種:可變對象和不可變對象。不可變對象包括int,float,long,str,tuple等,可變對象包括list,set,dict等。這裏說

原创 numpy學習之linspace

numpy.linspace numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None) 該函數返回一組具有相同間隔的數據/採樣值,數

原创 python積分scipy.integrate

python積分scipy.integrate scipy.integration提供多種積分的工具,主要分爲以下兩類。 對給出的函數公式積分:quad dblquad tplquad fixed_quad quadrature

原创 Single Number

Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm sho

原创 Add Two Numbers

You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order

原创 PyLucene學習之一

簡介 Lucene是一款高性能的、可擴展的信息檢索工具庫。 信息檢索是指文檔搜索,文檔內信息搜索或者文檔相關的元數據搜索等操作。 Lucene只是搜索程序的核心索引和搜索模塊 搜索程序首先需要實現的功能是索引鏈, 分爲以下幾個步驟:

原创 PyLucene學習之三

Lucene分析器及統計詞頻 分析 分析(Analysis),在Lucene中指的是將域(Field)文本轉換成最基本的索引表示單元—項(Term)的過程。 語彙單元化過程(tokenization),從文本中提取的文本塊稱爲語彙單元(t

原创 Number of Islands

Given a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number of islands. An island is surrounded by water and

原创 PyLucene學習之二

文檔和域 文檔是Lucene索引和搜索的原子單位,文檔爲包含一個或多個域的容器,而域則依次包含”真正的“被索引內容。 索引 提取文本->創建對應Document實例->通過分析將域文本處理成大量語彙單元->將語彙單元加入段結構 使用倒

原创 Two Sum

Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specific target. You m

原创 Pascal's Triangle II

Total Accepted: 105799 Total Submissions: 297504 Difficulty: Easy Contributors: Admin Given an index k, return the

原创 Third Maximum Number

Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the ma

原创 Pascal's Triangle

Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5, Return [ [1],