- 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
- 虚词:副词、介词、连词、助词、拟声词、叹词。
n 名词
nr 人名
| CC_RESET='[00m' | |
| CC_WHITE='[1;37m' | |
| CC_LIGHT_BLUE='[1;34m' | |
| CC_LIGHT_GREEN='[1;32m' | |
| CC_LIGHT_RED='[1;31m' | |
| function get_git_repos_branch() | |
| { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/" | |
| } |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Author : Linusp | |
| Date : 2014/08/30 | |
| Description: Simple Perceptron Training | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Author : Linusp | |
| Date : 2014/08/30 | |
| Description: Simple Perceptron Training | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Author : Linusp | |
| Date : 2014/08/30 | |
| Description: Linear Regression | |
| """ | |
| import numpy as np | |
| import matplotlib as mpl |
| # List unique values in a DataFrame column | |
| pd.unique(df.column_name.ravel()) | |
| # Convert Series datatype to numeric, getting rid of any non-numeric values | |
| df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
| # Grab DataFrame rows where column has certain values | |
| valuelist = ['value1', 'value2', 'value3'] | |
| df = df[df.column.isin(valuelist)] |
Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
| import re | |
| import pickle | |
| from math import sqrt | |
| from operator import itemgetter | |
| from collections import defaultdict, Counter | |
| import click | |
| // ==UserScript== | |
| // @name Weiboda Redirection | |
| // @name:zh-CN 微博档案真实链接地址重定向 | |
| // @description 获取微博档案中的原始链接地址 | |
| // @grant none | |
| // @run-at document-start | |
| // @include *//weibo.wbdacdn.com/url/* | |
| // ==/UserScript== |
| from elasticsearch import Elasticsearch | |
| from elasticsearch.helpers import scan | |
| index = 'some-index' | |
| doctype = 'some-doctype' | |
| client = Elasticsearch(hosts=['localhost:9200']) | |
| for item in scan(client, index=index, doc_type=doctype, preserve_order=True): | |
| print(item['_source']) |