Skip to content

Commit

Permalink
add some plugin & modify .vimrc
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name Here committed Aug 27, 2012
1 parent dc7f328 commit 2b980b9
Show file tree
Hide file tree
Showing 292 changed files with 7,508 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .VimballRecord
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
markdown-1.2.2.vba: call delete('/home/ma6174/.vim/ftdetect/markdown.vim')|call delete('/home/ma6174/.vim/snippets/markdown.snippets')|call delete('/home/ma6174/.vim/syntax/markdown.vim')
mark.vba: call delete('/home/ma6174/.vim/autoload/mark.vim')|call delete('/home/ma6174/.vim/autoload/mark/palettes.vim')|call delete('/home/ma6174/.vim/plugin/mark.vim')|call delete('/home/ma6174/.vim/doc/mark.txt')
4 changes: 2 additions & 2 deletions .netrwhist
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =2
let g:netrw_dirhist_1='/home/ma6174/.vim/ftplugin/python'
let g:netrw_dirhist_2='/media/M_hM_=M_M_dM__M_6M_hM_5M__DM_fM__VM__Y/YUNIO/program/python/poj'
let g:netrw_dirhist_1='/media/M_hM_=M_M_dM__M_6M_hM_5M__DM_fM__VM__Y/YUNIO/program/python/lovesnow-deepin-music-player-a9be3e0'
let g:netrw_dirhist_2='/media/M_hM_=M_M_dM__M_6M_hM_5M__DM_fM__VM__Y/YUNIO/program/python'
Binary file added .vim
Binary file not shown.
Empty file modified .vimrc
100755 → 100644
Empty file.
Empty file modified .zshrc
100755 → 100644
Empty file.
52 changes: 52 additions & 0 deletions Youdao.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env python
#coding=utf-8
import urllib
import json
#ret = '''{"translation":["苹果"],"basic":{"phonetic":"'æpl","explains":["n. 苹果;家伙"]},"query":"apple","errorCode":0,"web":[{"value":["苹果","苹果公司","苹果汁","美国苹果"],"key":"Apple"},{"value":["苹果电脑","苹果电脑公司","苹果计算机","苹果公司"],"key":"Apple Computer"},{"value":["苹果公司","苹果","果公司","苹果股份有限公司"],"key":"Apple Inc"},{"value":["大苹果","纽约","大苹果城","纽约的别称"],"key":"big apple"},{"value":["苹果皮"],"key":"apple skin"},{"value":["苹果馅饼","苹果饼","苹果排","苹果蛋糕"],"key":"apple tart"},{"value":["苹果日报","韩版恶作之吻造型曝光"],"key":"Apple Daily"},{"value":["垫脚箱","因在早期电影制作中"],"key":"APPLE BOXES"},{"value":["炸苹果饼"],"key":"apple fritter"},{"value":["查拉尔·阿佩尔","阿佩尔","由查拉尔阿"],"key":"Gerald Apple"}]}'''
def dealjson(ret):
ret = json.loads(ret)
error = ret['errorCode']
print error
if error == 20:
print '要翻译的文本过长'
elif error == 30:
print '无法进行有效的翻译'
elif error == 40:
print '不支持的语言类型'
elif error == 50:
print '无效的key'
elif error == 0:
trans = ret['translation']
for i in trans:
print i
print ret['query']
if 'basic' in ret.keys():
explain = ret['basic']['explains']
for i in explain:
print i
web =ret['web']
for i in web:
print i['key'],
for j in i['value']:
print j,
print

def youdao(word):
word = urllib.quote(word)
print word
url = 'http://fanyi.youdao.com/openapi.do?keyfrom=ACM-OnlineJudge&key=2091830782&type=data&doctype=json&version=1.1&q='+word
ret = urllib.urlopen(url).read()
dealjson(ret)


if __name__=='__main__':
while True:
word = raw_input('input: ')
if word == '':
continue
word = urllib.quote(word)
print word
url = 'http://fanyi.youdao.com/openapi.do?keyfrom=ACM-OnlineJudge&key=2091830782&type=data&doctype=json&version=1.1&q='+word
ret = urllib.urlopen(url).read()
dealjson(ret)

Empty file modified after/complete-dict
100755 → 100644
Empty file.
Empty file modified after/ftplugin/python_pydiction.vim
100755 → 100644
Empty file.
Empty file modified after/plugin/snipMate.vim
100755 → 100644
Empty file.
Empty file modified after/pydiction.py
100755 → 100644
Empty file.
Empty file modified autoload/acp.vim
100755 → 100644
Empty file.
Empty file modified autoload/conque_term.vim
100755 → 100644
Empty file.
Empty file modified autoload/conque_term/conque.py
100755 → 100644
Empty file.
Empty file modified autoload/conque_term/conque_globals.py
100755 → 100644
Empty file.
Empty file modified autoload/conque_term/conque_screen.py
100755 → 100644
Empty file.
Empty file modified autoload/conque_term/conque_sole.py
100755 → 100644
Empty file.
Empty file modified autoload/conque_term/conque_sole_communicator.py
100755 → 100644
Empty file.
Empty file modified autoload/conque_term/conque_sole_shared_memory.py
100755 → 100644
Empty file.
Empty file modified autoload/conque_term/conque_sole_subprocess.py
100755 → 100644
Empty file.
Empty file modified autoload/conque_term/conque_sole_wrapper.py
100755 → 100644
Empty file.
Empty file modified autoload/conque_term/conque_subprocess.py
100755 → 100644
Empty file.
Empty file modified autoload/conque_term/conque_win32_util.py
100755 → 100644
Empty file.
Empty file modified autoload/hammer.vim
100755 → 100644
Empty file.
Loading

0 comments on commit 2b980b9

Please sign in to comment.