原创 虛擬機Linux配置網絡

1. cd /etc/sysconfig/network-scripts 2. ls     vi ifcfg-eno1 (打開第一個文件,輸入i進入編輯狀態)            3.把onboot改爲yes, 保存(輸入es

原创 Mac OS install mongodb

1. install mongodb >>> brew install mongodb 2. create data directory >>> sudo mkdir -p /data/db 3. set permission for d

原创 MongoDB 基礎知識

轉自pantao :http://segmentfault.com/a/1190000002694268?_ea=184402#articleHeader8 基本概念 文檔是 MongoDB 中數據的基本單元,非常類似於關係型數據

原创 Crawler爬蟲實例:huawei appstore

1. create a scrapy project >>> scrapy startproject appstore 2. define extracted data schema edit appstore/appstore/ite

原创 在Mac OS El Capitan下用pip安裝Scrapy 失敗

環境:同時安裝了Python 2.7,Python 3.4使用 安裝命令 pip install Scrapy下載正常安裝時出錯:Installing collected packages: Scrapy, six, queuelib,

原创 linux達人養成計劃:Linux簡介

Imooc.com下 linux達人養成計劃I課程筆記   一、版本介紹 內核官網地址:www.kernal.org不要追求最新的版本 內核版本(eg.2.6.18) (主版本.次版本.末版本) Linux不同的發行版本

原创 python count(), lower(), ord(), chr(), isalpha()

Question: You are given a text, which containsdifferent english letters and punctuation symbols. You should find the mo

原创 Scrapy 示例 —— Web 爬蟲框架

英文原文:Scrapy demo 譯者:skyim 原文:http://www.oschina.net/translate/scrapy-demo 在這個教材中,我們假定你已經安裝了Scrapy。假如你沒有安裝,你可以參考這個安裝指南

原创 python zip(), map()

Question: Tic-Tac-Toe, sometimes also known as Xs andOs, is a game for two players (X and O) who take turns marking the

原创 python join(), bool(), strip(), dict()

Question: Stephen's speech module is broken. Thismodule is responsible for his number pronunciation. He has to click to

原创 Linux養成計劃:grep詳解

原文來自http://www.cnblogs.com/ggjucheng/archive/2013/01/13/2856896.html 簡介 grep (global search regular expression(RE) an

原创 Linux養成計劃:文件搜索命令

    1.    文件搜索命令locate(搜索速度快,功能單一,只能搜文件名) >>> locate文件名 locate是後臺數據庫搜索,搜索速度快。 locate 使用要點:注數據庫默認是每天更新一次,可以用updatedb 命令

原创 Linux養成計劃:sed詳解

原文出自 http://www.cnblogs.com/ggjucheng/archive/2013/01/13/2856901.html  sed命令詳解 簡介 sed 是一種在線編輯器,它一次處理一行內容。處理時,把當前處理的

原创 Appstore proj: Calculate an App's Top-5 related apps(1)

How to calculate similarity? use cosine similarity! Edit helper.py. So you can call the function in helper class wh

原创 單例模式(Singleton)

單例模式(Singleton)的6種實現 轉自 http://www.cnblogs.com/rush/archive/2011/10/30/2229565.html 1.1.1 摘要        在我們日常的工作中經常需