V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  yunkchen  ›  全部回复第 10 页 / 共 10 页
回复总数  192
1  2  3  4  5  6  7  8  9  10  
2017-06-15 11:11:07 +08:00
回复了 gunshot 创建的主题 程序员 高考完的女孩怎么入门 CS?
还以为是 cs:go,要讨论甩狙...
2017-06-14 12:23:26 +08:00
回复了 cqcn1991 创建的主题 问与答 坐标上海,推荐一下你喜欢的餐馆?
@cqcn1991 味道很清爽、价格实惠!
2017-06-14 11:31:04 +08:00
回复了 cqcn1991 创建的主题 问与答 坐标上海,推荐一下你喜欢的餐馆?
南京大排档
寿宁路的 17 号龙虾馆
自来水系统!!学习了!
2017-06-09 17:59:41 +08:00
回复了 blacklinux 创建的主题 上海 上海,全栈,实习生, 3K-6k
是不是这家公司的黑粉吖
@lk920724 WiFi 记人头数在餐厅和自习室之类的比较准,篮球场、足球场之类的运动空间不会很准的。
2017-06-02 08:39:51 +08:00
回复了 RHFS 创建的主题 塞尔达传说 塞尔达微信群
离塞尔达我还缺一个 switch.......以及塞尔达!
2017-05-23 10:52:26 +08:00
回复了 hellogbk 创建的主题 程序员 各个价位的眼罩都试过了,就没有一款不勒耳朵的
加一层遮光窗帘更实在
2017-04-11 11:31:54 +08:00
回复了 zzcchh 创建的主题 Python 谷歌翻译的一个可用网页接口
# -*- coding: UTF-8 -*-

"""
@author:yunkchen
@file:translate.py
@time:2017/4/10 0010 下午 1:52
"""
import requests
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
en2zh_url = "https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=zh&dt=t&q="
zh2en_url = "https://translate.googleapis.com/translate_a/single?client=gtx&sl=zh&tl=en&dt=t&q="
headers = { "Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"Accept-Encoding":"gzip, deflate, sdch, br",
"Accept-Language":"zh-CN,zh;q=0.8",
"User-Agent":"Mozilla/5.0 (iPad; CPU OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1",
"Referer": "http://wap.baidu.com"
}


def translate(word):
word = word.decode("utf-8")
if word >= u'\u4e00' and word<=u'\u9fa5':
response = requests.get(zh2en_url+word, timeout=60, headers=headers)
ch = response.content.split("\"")[1]
print(ch)
else:
response = requests.get(en2zh_url+word, timeout=60, headers=headers)
ch = response.content.split("\"")[1]
print(ch)

while True:
word = raw_input("Please input word:")
translate(word)
1  2  3  4  5  6  7  8  9  10  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3132 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 25ms · UTC 14:09 · PVG 22:09 · LAX 07:09 · JFK 10:09
Developed with CodeLauncher
♥ Do have faith in what you're doing.