bicloud

4月 232017
 
http://alias-i.com/lingpipe/  LingPipe is tool kit for processing text using computational linguistics.
http://svmlight.joachims.org/ 基于svm做文本分类
http://adrem.ua.ac.be/~tmartin/  svm jni java接口
https://github.com/antoniosehk/keras-tensorflow-windows-installation  windows上安装基于tensoflow-gpu的keras深度学习包
http://thegrandjanitor.com/  机器学习
http://www.wsdm-conference.org/2017/accepted-papers/  wsdm 2017 accepted papers
https://www.slideshare.net/BhaskarMitra3/neural-text-embeddings-for-information-retrieval-wsdm-2017
https://github.com/laura-dietz/tutorial-utilizing-kg
http://colah.github.io/posts/2015-08-Understanding-LSTMs/
https://cmusatyalab.github.io/openface/
https://eliasvansteenkiste.github.io/ Predicting lung cancer
https://brage.bibsys.no/xmlui/handle/11250/2433761 Tree Boosting With XGBoost - Why Does XGBoost Win "Every" Machine Learning Competition?
https://github.com/YaronBlinder/MIMIC-III_readmission/ Predicting 30-day ICU readmissions from the MIMIC-III database
https://github.com/caffe2/caffe2  facebook  开源深度学习框架 caffe2
MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications https://arxiv.org/abs/1704.04861
https://zhuanlan.zhihu.com/p/24322376 欺诈盛宴:百万黑产军团,两千万手机号,瓜分百亿蛋糕


 
 Posted by at 6:16 下午
4月 222017
 

常用工具

1. 文本处理

(1)atom ,https://atom.io/,常用插件

列编辑,https://atom.io/packages/Sublime-Style-Column-Selection

Run code in Atom 主要是运行 python https://atom.io/packages/script

项目管理 https://atom.io/packages/project-manager

markdown编辑 https://atom.io/packages/markdown-preview-plus

markdown-scroll-sync https://atom.io/packages/markdown-scroll-sync 

Python Autocomplete Package https://atom.io/packages/autocomplete-python

HQL (Apache Hive) query language https://atom.io/packages/language-hql

(2)sublime text ,http://www.sublimetext.com/

(3)markdown mac版本,http://macdown.uranusjr.com/

(4) pandoc, http://www.pandoc.org/, 格式转换,markdown等处理

(5) word, ppt, excel, onenote, 画图,笔记,表格处理

2. 编码相关工具

pycharm,http://www.jetbrains.com/pycharm/

intelij IDEA, http://www.jetbrains.com/idea/

maven , http://maven.apache.org/, 项目管理

visual studio code,https://code.visualstudio.com/

rstudio, https://www.rstudio.com/

3. 思维导图

xmind http://www.xmindchina.net/

4. 终端登录工具

iterm2 macos http://www.iterm2.com/

putty windows 

5. 网络分析

gelphi,https://gephi.org/

6. 可视化工具

graphviz, http://www.graphviz.org/

7. ftp工具

FileZilla, https://filezilla-project.org/

8. 代码版本管理

git, https://git-scm.com/

9. 文档写作

mkdocs, http://www.mkdocs.org/

10. 数据库工具

mysql, https://www.mysql.com/ postgresql, https://www.postgresql.org/


 
 Posted by at 12:22 上午
4月 152017
 
http://adventuresinmachinelearning.com/neural-networks-tutorial/
http://adventuresinmachinelearning.com/improve-neural-networks-part-1/
http://adventuresinmachinelearning.com/stochastic-gradient-descent/
https://github.com/adventuresinML/adventures-in-ml-code
https://github.com/yandexdataschool/Practical_RL 增强学习实践课程
https://github.com/yandexdataschool/YSDA_deeplearning17 Deep Learning course, 2017
https://webhose.io/datasets  免费数据集
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/keras/python/keras/applications/vgg16.py
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/keras/python/keras/applications/vgg19.py
https://arxiv.org/pdf/1409.1556.pdf VERY DEEP CONVOLUTIONAL NETWORKS FOR LARGE-SCALE IMAGE RECOGNITION
https://github.com/machrisaa/tensorflow-vgg
transfer learning
pre-train networks
https://github.com/BVLC/caffe/tree/master/models
http://mscoco.org/dataset/#download
https://github.com/visipedia/inat_comp
https://rahulduggal2608.wordpress.com/2017/04/02/alexnet-in-keras/


互联网黑产剖析——虚假号码
http://mp.weixin.qq.com/s?__biz=MzA4MjI2MTcwMw==&mid=2650485616&idx=1&sn=d26063f090b936d7efd3fedf32108df0&chksm=8787f0d8b0f079ce57ba26a9a6deb1f444a7939b6a1d443a3cbc773b662084bc6eaf8a16ea74&scene=21#wechat_redirect
互联网黑产剖析——代理和匿名
http://mp.weixin.qq.com/s?__biz=MzA4MjI2MTcwMw==&mid=2650485686&idx=1&sn=b8d3fd492e7fd27c0ceec7a98511c63b&chksm=8787f01eb0f0790824d1d0ac37a6817416e7ec79e535d7ba8e628628eef6fcaac962ca3ebfe0&scene=21#wechat_redirect
关于IP,这里有你想知道的一切!(上篇)
http://mp.weixin.qq.com/s?__biz=MzA4MjI2MTcwMw==&mid=2650485704&idx=1&sn=a34cb411701008ed13b1042ba549d341&chksm=8787f060b0f0797642628a9bba9f4ea5f713f4bb8b0347a69630938c333ca6ee3ce46ca470a3&scene=21#wechat_redirect

https://github.com/stuxuhai/jpinyin  JPinyin是一个汉字转拼音的Java开源类库
   com.github.stuxuhai
   jpinyin
   1.1.8


https://github.com/NLPchina/ansj_seg  中文分词
    org.ansj
    ansj_seg
    5.1.1

emoji-java is a lightweight java library that helps you use Emojis in your java applications.
  com.vdurmont
  emoji-java
  3.2.0


 
 Posted by at 6:22 下午
4月 082017
 

https://github.com/kwotsin/awesome-deep-vision
from https://github.com/m2dsupsdlclass/lectures-labs
LeCun, Y., Bottou, L., Bengio, Y., and Haffner, P. (1998). Gradient-based learning applied to document recognition. LeNet
Simonyan, Karen, and Zisserman. "Very deep convolutional networks for large-scale image recognition." (2014) VGG-16
Simplified version of Krizhevsky, Alex, Sutskever, and Hinton. "Imagenet classification with deep convolutional neural networks." NIPS 2012 AlexNet
He, Kaiming, et al. "Deep residual learning for image recognition." CVPR. 2016. ResNet
Szegedy, et al. "Inception-v4, inception-resnet and the impact of residual connections on learning." (2016)
Canziani, Paszke, and Culurciello. "An Analysis of Deep Neural Network Models for Practical Applications." (May 2016).

classification and localization
Redmon, Joseph, et al. "You only look once: Unified, real-time object detection." CVPR (2016)
Liu, Wei, et al. "SSD: Single shot multibox detector." ECCV 2016
Girshick, Ross, et al. "Fast r-cnn." ICCV 2015
Ren, Shaoqing, et al. "Faster r-cnn: Towards real-time object detection with region proposal networks." NIPS 2015
Redmon, Joseph, et al. "YOLO9000, Faster, Better, Stronger." 2017

segmentation
Long, Jonathan, et al. "Fully convolutional networks for semantic segmentation." CVPR 2015
Noh, Hyeonwoo, et al. "Learning deconvolution network for semantic segmentation." ICCV 2015
Pinheiro, Pedro O., et al. "Learning to segment object candidates" / "Learning to refine object segments", NIPS 2015 / ECCV 2016
Li, Yi, et al. "Fully Convolutional Instance-aware Semantic Segmentation." Winner of COCO challenge 2016.

弱监督学习 Weak supervision
Joulin, Armand, et al. "Learning visual features from large weakly supervised data." ECCV, 2016
Oquab, Maxime, "Is object localization for free? – Weakly-supervised learning with convolutional neural networks", 2015

Self-supervised learning
Doersch, Carl, Abhinav Gupta, and Alexei A. Efros. "Unsupervised visual representation learning by context prediction." ICCV 2015.


dnn优化
Ren, Mengye, et al. "Normalizing the Normalizers: Comparing and Extending Network Normalization Schemes." 2017
Salimans, Tim, and Diederik P. Kingma. "Weight normalization: A simple reparameterization to accelerate training of deep neural networks." NIPS 2016.
Ba, Jimmy Lei, Jamie Ryan Kiros, and Geoffrey E. Hinton. "Layer normalization." 2016.
Ioffe, Sergey, and Christian Szegedy. "Batch normalization: Accelerating deep network training by reducing internal covariate shift." ICML 2015
Generalization
Understanding deep learning requires rethinking generalization, C. Zhang et al., 2016.
On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima, N. S. Keskar et al., 2016
1. A strong optimizer is not necessarily a strong learner.
2. DL optimization is non-convex but bad local minima and saddle structures are rarely a problem (on common DL tasks).
3. Neural Networks are over-parametrized but can still generalize.
4. Stochastic Gradient is a strong implicit regularizer.
5. Variance in gradient can help with generalization but can hurt final convergence.
6. We need more theory to guide the design of architectures and optimizers that make learning faster with fewer labels.
7. Overparametrize deep architectures
8. Design architectures to limit conditioning issues:
(1)Use skip / residual connections
(2)Internal normalization layers
(3)Use stochastic optimizers that are robust to bad conditioning
9. Use small minibatches (at least at the beginning of optimization)
10. Use validation set to anneal learning rate and do early stopping
11. Is it very often possible to trade more compute for less overfitting with data augmentation and stochastic regularizers (e.g. dropout).
12. Collecting more labelled data is the best way to avoid overfitting.


 
 Posted by at 4:04 下午
4月 052017
 

大数据风控创业公司

1. siftscience

介绍

https://siftscience.com

提供的服务:

盗账户,支付欺诈,垃圾内容, 账户冒用,营销资金冒用,设备指纹

服务行业:

电子商务,旅游,订票,数字产品等;

技术博客

https://engineering.siftscience.com,介绍siftscience的风控技术,工程,算法和架构;

2. forter

介绍

https://www.forter.com

服务: All E-Commerce Needs Marketplaces,Digital Goods,Services,Physical Goods,Travel ,Mobile (SDK & API),Alternative Payments

技术: Machine Learning with a Human Touch, Understanding the Context of a Transaction, Real-Time Approve/Decline Decision

技术博客

http://blog.forter.com,介绍反欺诈相关的业务,技术发展和报告;

3. datavisor

介绍

https://www.datavisor.com

提供的服务:

金融欺诈,反洗钱,电子商务反欺诈

服务行业:

yelp, momo,唱吧等

技术博客

https://www.datavisor.com/blog/, 介绍datavisor在大数据风控的技术,产品和架构,机器学习,规则引擎和决策平台等;

4. patternex

介绍

https://www.patternex.com

提供的服务: 数据分析,盗账户, 人工智能风控助理 基于大数据分析驱动人工智能,提供大数据风控服务;

技术博客

https://www.patternex.com/blog,介绍patternex通过人工智能技术在大数据风控领域的研究和探索,技术介绍和反欺诈相关的报告;


 
 Posted by at 8:55 下午
4月 042017
 

自然语言处理

1. 词向量表示

distributional representation vs. distributed representation 分布式表达(一类表示方法,基于统计含义),分散式表达(从一个高维空间X映射到一个低维空间Y) 分布假说(distributional hypothesis)为这一设想提供了 理论基础:上下文相似的词,其语义也相似.

自然语言处理的基础是词向量化,即文本数值化,后面进行数据挖掘工作就和常见的任务类似,即分类,聚类等等。

1.1 one-hot encoding

In vector space terms, this is a vector with one 1 and a lot of zeroes

[0 0 0 0 0 0 0 0 0 0 1 0 0 0 0]

1.2 count-based

tf*idf

svd 

Glove

1.3 word embedding

基于神经网络的词向量表示 word2vec(2*2=4)四种训练方法

网络结构 CBOW,skip-gram

训练方法 Hierarchical Softmax,negative sampling

2. 词向量实现工具

word2vec

https://code.google.com/archive/p/word2vec/

gensim

https://github.com/RaRe-Technologies/gensim

fasttext

https://github.com/facebookresearch/fastText


from gensim.models import KeyedVectors

model = KeyedVectors.load_word2vec_format("wiki.en.vec")
words = []
for word in model.vocab:
    words.append(word)

print("word count: {}".format(len(words)))

print("Dimensions of word: {}".format(len(model[words[0]])))

demo_word = "car"

for similar_word in model.similar_by_word(demo_word):
    print("Word: {0}, Similarity: {1:.2f}".format(
        similar_word[0], similar_word[1]
    ))

word count: 2519370
Dimensions of word: 300
Word: cars, Similarity: 0.83
Word: automobile, Similarity: 0.72
Word: truck, Similarity: 0.71
Word: motorcar, Similarity: 0.70
Word: vehicle, Similarity: 0.70
Word: driver, Similarity: 0.69
Word: drivecar, Similarity: 0.69
Word: minivan, Similarity: 0.67
Word: roadster, Similarity: 0.67
Word: racecars, Similarity: 0.67

Glove

https://github.com/stanfordnlp/GloVe



import os

import numpy as np
import matplotlib.pyplot as plt
from sklearn.manifold import TSNE
from tsne import bh_sne

def read_glove(glove_file):
    embeddings_index = {}
    embeddings_vector = []
    f = open("glove.6B.100d.txt", "rb")
    word_idx = 0
    for line in f:
        values = line.decode("utf-8").split()
        word = values[0]
        vector = np.asarray(values[1:], dtype="float64")
        embeddings_index[word] = word_idx
        embeddings_vector.append(vector)
        word_idx += 1
    f.close()
    inv_index = {v : k for k, v in embeddings_index.items()}
    glove_embeddings = np.vstack(embeddings_vector)
    glove_norms = np.linalg.norm(glove_embeddings, axis=-1, keepdims=True)
    glove_embeddings_normed = glove_embeddings / glove_norms
    # glove_embeddings_normed.fill(0)

    return embeddings_index, glove_embeddings, glove_embeddings_normed, inv_index

def get_emb(word, embeddings_index, glove_embeddings):
    idx = embeddings_index.get(word)
    if idx is None:
        return None
    else:
        return glove_embeddings[idx]

def get_normed_emb(word, embeddings_index, glove_embeddings_normed):
    idx = embeddings_index.get(word)
    if idx is None:
        return None
    else:
        return glove_embeddings_normed[idx]


def most_similar(words, inv_index, embeddings_index, glove_embeddings, glove_embeddings_normed, topn=10):
    query_emb = 0

    if type(words) == list:
        for word in words:
            query_emb += get_emb(word, embeddings_index, glove_embeddings)
    else:
        query_emb = get_emb(words, embeddings_index, glove_embeddings)

    query_emb = query_emb / np.linalg.norm(query_emb)

    cosin = np.dot(glove_embeddings_normed, query_emb)

    idxs = np.argsort(cosin)[::-1][:topn]

    return [(inv_index[idx], cosin[idx]) for idx in idxs]


def plot_tsne(glove_embeddings_normed, inv_index, perplexity, img_file_name, word_cnt=100):
    #word_emb_tsne = TSNE(perplexity=30).fit_transform(glove_embeddings_normed[:word_cnt])
    word_emb_tsne = bh_sne(glove_embeddings_normed[:word_cnt], perplexity=perplexity)
    plt.figure(figsize=(40, 40))
    axis = plt.gca()
    np.set_printoptions(suppress=True)
    plt.scatter(word_emb_tsne[:, 0], word_emb_tsne[:, 1], marker=".", s=1)
    for idx in range(word_cnt):
        plt.annotate(inv_index[idx],
                     xy=(word_emb_tsne[idx, 0], word_emb_tsne[idx, 1]),
                     xytext=(0, 0), textcoords='offset points')
    plt.savefig(img_file_name)
    plt.show()

def main():
    glove_input_file = "glove.6B.100d.txt"
    embeddings_index, glove_embeddings, glove_embeddings_normed, inv_index = read_glove(glove_input_file)
    print(np.isfinite(glove_embeddings_normed).all())
    print(glove_embeddings.shape)
    print(get_emb("computer", embeddings_index, glove_embeddings))
    print(most_similar("cpu", inv_index, embeddings_index, glove_embeddings, glove_embeddings_normed))
    print(most_similar(["river", "chinese"], inv_index, embeddings_index, glove_embeddings, glove_embeddings_normed))
    # plot tsne viz
    plot_tsne(glove_embeddings_normed, inv_index, 30.0, "tsne.png", word_cnt=1000)

if __name__ == "__main__":
    main()



3. papers

  1. Neural Word Embeddings as Implicit Matrix Factorization
  2. Linguistic Regularities in Sparse and Explicit Word Representation
  3. Random Walks on Context Spaces Towards an Explanation of the Mysteries of Semantic Word Embeddings
  4. word2vec Explained Deriving Mikolov et al.’s Negative Sampling Word Embedding Method
  5. Linking GloVe with word2vec
  6. Word Embedding Revisited: A New Representation Learning and Explicit Matrix Factorization Perspective
  7. Hierarchical Probabilistic Neural Network Language Model
  8. Notes on Noise Contrastive Estimation and Negative Sampling
  9. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models
  10. Distributed Representations of Words and Phrases and their Compositionality
  11. Efficient Estimation of Word Representations in Vector Space
  12. GloVe Global Vectors forWord Representation
  13. Neural probabilistic language models
  14. Natural language processing (almost) from scratch
  15. Learning word embeddings efficiently with noise contrastive estimation
  16. A scalable hierarchical distributed language model
  17. Three new graphical models for statistical language modelling
  18. Improving word representations via global context and multiple word prototypes
  19. A Primer on Neural Network Models for Natural Language Processing
  20. Joulin, Armand, et al. "Bag of tricks for efficient text classification." FAIR 2016
  21. P. Bojanowski, E. Grave, A. Joulin, T. Mikolov, Enriching Word Vectors with Subword Information

https://github.com/oxford-cs-deepnlp-2017/lectures

wget http://nlp.stanford.edu/data/glove.6B.zip

wget https://s3-us-west-1.amazonaws.com/fasttext-vectors/wiki.zh.zip

wget https://s3-us-west-1.amazonaws.com/fasttext-vectors/wiki.en.zip

https://blog.manash.me/how-to-use-pre-trained-word-vectors-from-facebooks-fasttext-a71e6d55f27

4. 自然语言处理应用

自然语言处理的基础是文本词向量化,之后可以进行分类,聚类,情感分析等等。

Natural Language Processing

Topic Classification

Topic modeling

Sentiment Analysis

Google Translate

Chatbots / dialogue systems

Natural language query understanding (Google Now, Apple Siri, Amazon Alexa)

Summarization


 
4月 022017
 

python ngram


# -*- coding: utf-8 -*-
# @DATE    : 2017/4/1 10:39
# @Author  : 
# @File    : ngram.py
from collections import defaultdict


def gen_n_gram(input, sep=" ", n=2):
    input = input.split(sep)
    output = {}
    for i in xrange(len(input) - n + 1):
        gram = "".join(input[i: i + n])
        output.setdefault(gram, 0)
        output[gram] += 1
    return output


def dict_sum(*dict):
    ret = defaultdict(int)
    for d in dict:
        for k, v in d.items():
            ret[k] += v
    return ret


def sum_n_gram(inputs, sep=" ", n=2):
    output_sum = defaultdict(int)
    for input in inputs:
        output_sum = dict_sum(output_sum, gen_n_gram(input))
    output_sum = sorted(output_sum.items(), key=lambda x: x[1], reverse=True)
    return output_sum


if __name__ == "__main__":
    inputs = ["a a a j 9 3 h d e", "a j 9 3 h", "g g h 9 3"]
    print(gen_n_gram("a a a j 9 3 h d e"))
    output = sum_n_gram(inputs)
    print(output)
    output_file = "dict.txt"
    cnt = len(output)
    with open(output_file, "w") as out:
        for i, value in enumerate(output):
            if i + 1 <</span> cnt:
                out.write("{}:{}n".format(value[0], value[1]))
            else:
                out.write("{}:{}".format(value[0], value[1]))

运行日志


{'aa': 2, 'de': 1, 'j9': 1, 'aj': 1, '3h': 1, '93': 1, 'hd': 1}
[('93', 3), ('aa', 2), ('aj', 2), ('j9', 2), ('3h', 2), ('de', 1), ('gg', 1), ('h9', 1), ('hd', 1), ('gh', 1)]

Process finished with exit code 0

 
 Posted by at 12:32 下午
3月 262017
 
文章主要是关于用户意图预测和pinterest视觉搜索引擎相关的探索

精华

paper:Predicting Intent Using Activity Logs: How Goal Specificity and Temporal Range Affect User Behavior

We find that goal specificity is bimodal – users tend to be either strongly goal-specific or goal- nonspecific. 

Goal-specific users search more and consume less content in greater detail than goal-nonspecific users: 

they spend more time using Pinterest, but are less likely to return in the near future. 

Users with short-term goals are also more focused and more likely to refer to past saved content than users with long-term goals, but less likely to save content for the future. 

Further, intent can vary by demographic, and with the topic of interest. Last, we show that user’s intent and activity are intimately related by building a model that can predict a user’s intent for using Pinterest after observing their activity for only two minutes.

paper:Understanding Behaviors that Lead to Purchasing: A Case Study of Pinterest

We analyze the purchasing behavior of nearly three million Pinterest users to determine short-term and long-term signals in user behavior that indicate higher purchase intent. We find that users with long-term purchas- ing intent tend to save and clickthrough on more content. However, as users approach the time of purchase their ac- tivity becomes more topically focused and actions shift from saves to searches.

We further find that purchase signals in online behavior can exist weeks before a purchase is made and can also be traced across different purchase categories.

paper:Visual Discovery at Pinterest

pinterest 视觉发现引擎,经验总结:

(1)advances in computer vision, especially the use of convolutional networks and GPU acceleration, have led to significant improvements in tasks such as image classifica- tion and object detection.

(2)a substantial number of users prefer using discovery systems to browse rather than to search.

实验

(1) FEATURE REPRESENTATION 特征表示学习

基于已有的模型,adopted and evaluated several popular classification models such as AlexNet[20], GoogLeNet [35], VGG16 [32], and variants ResNet101 and ResNet152[12].

(2) OBJECT DETECTION

Extracting objects from images not only allows us to build novel discovery experiences (e.g. Section 8), but also improves user engagement metrics;算法Faster R-CNN

(3)PINTEREST RELATED PINS

相关性推荐Related Pins is a pin recommendation system that lever- ages the vast amount of human-curated content on Pinter- est to provide personalized recommendations of pins based on a given query pin.Covnet features for recommendations;




 
3月 252017
 

python 获取tensorflow课程讲义

# -*- coding: utf-8 -*-
# @DATE    : 2017/3/25 11:08
# @Author  : 
# @File    : pdf_download.py

import os
import shutil
import requests
from bs4 import BeautifulSoup
import urllib2

def download_file(url, file_folder):
    file_name = url.split("/")[-1]
    file_path = os.path.join(file_folder, file_name)
    r = requests.get(url=url, stream=True)
    with open(file_path, "wb") as f:
        for chunk in r.iter_content(chunk_size=1024 * 1024):
            if chunk:
                f.write(chunk)
    r.close()
    return file_path

def get_pdfs(url, root_url, file_folder):
    html = urllib2.urlopen(url)
    soup = BeautifulSoup(html, "lxml")
    cnt = 0
    for link in soup.find_all("a"):
        file_url = link.get("href")
        if file_url.endswith(".pdf"):
            file_name = download_file(file_url, file_folder)
            print("downloading {} -> {}".format(file_url, file_name))
            cnt += 1
    print("downloaded {} pdfs".format(cnt))

def main():
    root_url = "http://web.stanford.edu/class/cs20si/lectures/"
    course_url = "http://web.stanford.edu/class/cs20si/syllabus.html"
    file_folder = "./course_note"
    if os.path.exists(file_folder):
        shutil.rmtree(file_folder)
    os.mkdir(file_folder)
    get_pdfs(course_url, root_url, file_folder)

if __name__ == "__main__":
    main()

 
 Posted by at 7:42 下午
3月 172017
 

文档制作工具mkdocs学习

最近在写项目文档,发现mkdocs非常轻量,基于markdown,生成静态html,托管在服务器即可访问,非常方便适用。

1. 介绍

mkdocs是一款基于markdown构建项目文档的工具,并且通过静态html文件,可以部署在服务器上提供访问。

2. mkdocs安装

pip install mkdocs


$ mkdocs --version
mkdocs, version 0.16.1

3.1 用法

新建项目 mkdocs new 项目名称,生成一个配置文件mkdocs.yml,同时在docs文件夹下生成一个 markdown文件index.md。


$ mkdocs new deeplearning
INFO    -  Creating project directory: deeplearning
INFO    -  Writing config file: deeplearning/mkdocs.yml
INFO    -  Writing initial docs: deeplearning/docs/index.md
$ cd deeplearning/
$ ll
total 8
drwxr-xr-x  3   staff   102B  3 17 11:11 docs
-rw-r--r--  1   staff    19B  3 17 11:11 mkdocs.yml

启动mkdocs内置的develop server


 $ mkdocs serve
INFO    -  Building documentation...
INFO    -  Cleaning site directory
[I 170317 11:35:02 server:283] Serving on http://127.0.0.1:8000
[I 170317 11:35:02 handlers:60] Start watching changes
[I 170317 11:35:02 handlers:62] Start detecting changes

http://localhost:8000



3.2 文档编辑

(1)编辑页面

(2)编辑配置文件


$ cat mkdocs.yml
site_name: 深度学习
pages:
    - home: index.md
    - content: deeplearning.md
    - about: about.md




 
 Posted by at 8:36 下午