This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding=utf8 | |
import string | |
import sys | |
import re | |
def conv_wide(chr): | |
#全角转半角 | |
code = ord(chr) | |
if chr == u'\u3000': #space | |
code = 32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Introduction to “This is Watson” | |
D. A. Ferrucci, "Introduction to “This is Watson”," in IBM Journal of Research and | |
Development, vol. 56, no. 3.4, pp. 1:1-1:15, May-June 2012. | |
doi: 10.1147/JRD.2012.2184356 | |
Abstract: In 2007, IBM Research took on the grand challenge of building a computer | |
system that could compete with champions at the game of Jeopardy!™. In 2011, the | |
open-domain question-answering (QA) system, dubbed Watson, beat the two | |
highest ranked players in a nationally televised two-game Jeopardy! match. This | |
paper provides a brief history of the events and ideas that positioned our team to | |
take on the Jeopardy! challenge, build Watson, IBM Watson™, and ultimately |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse | |
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse | |
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for python2 | |
def is_hanzi(text): | |
return all(u'\u4e00' <= char <= u'\u9fff' for char in text.decode('utf8')) | |
def has_hanzi(text): | |
return any(u'\u4e00' <= char <= u'\u9fff' for char in text.decode('utf8')) | |
# for python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e -x | |
while read line; do | |
read var1 var2 <<< $line # $line is spilited by '\t' | |
curl $var1 > tmp | |
iconv -f gbk -t utf8 tmp > pages/$var2 # conv encoding | |
done < $1 | |
rm tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"vundle | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
"git interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
a = 'test' | |
b = hashlib.md5(a.encode('utf8')) | |
print(b.hexdigest()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub Worksheet_SelectionChange(ByVal Target As Range) | |
Cells.Interior.ColorIndex = xlNone | |
Rows(Target.row).Interior.ColorIndex = 36 '所在行高亮显示 | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e -x | |
mkdir /usr/java | |
chmod 755 /usr/java/ | |
#将下载的JDK rpm包复制至创建的/usr/java目录下 | |
#执行命令进行安装,安装至/usr/java/的新建文件夹jdk1.8.0_111中 | |
cp /usr/local/src/jdk-8u162-linux-x64.rpm /usr/java/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CLICOLOR=1 | |
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] [\D{%a} \t] \n@$(ifconfig | grep "inet " | grep -v 127.0.0. | tail -1 | sed "s/netmask.*//" | sed "s/.*inet //" )\$ ' | |
alias ls='ls -lrt' | |
alias grep='grep --color' |
OlderNewer