V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  fzinfz  ›  全部回复第 45 页 / 共 45 页
回复总数  892
1 ... 36  37  38  39  40  41  42  43  44  45  
2015-05-12 13:09:15 +08:00
回复了 Halry 创建的主题 问与答 经常用 gitlab 用什么宽带好?不要太贵的
不用加宽带了,直接全部SSH远程吧。
先申请github student plan,有送DigitalOcean。(未亲测)
DO用完了,有信用卡的话,可以申请AWS,用EC2再撑一年。(在用)
2015-05-11 20:48:33 +08:00
回复了 ivanchou 创建的主题 Python 求氛围好的 Python 学习交流社区或 QQ 群
http://www.codewars.com/
练习各种编程题,很多高手代码
这有个更好的: http://dev.mysql.com/doc/connector-python/en/connector-python-example-cursor-transaction.html


add_salary = ("INSERT INTO salaries "
"(emp_no, salary, from_date, to_date) "
"VALUES (%(emp_no)s, %(salary)s, %(from_date)s, %(to_date)s)")

# Insert salary information
data_salary = {
'emp_no': emp_no,
'salary': 50000,
'from_date': tomorrow,
'to_date': date(9999, 1, 1),
}

cursor.execute(add_salary, data_salary)
为了LZ的视力着想,建议以后不要string join了,改用%s吧~

范例: http://mysql-python.sourceforge.net/MySQLdb.html

c.executemany(
"""INSERT INTO breakfast (name, spam, eggs, sausage, price)
VALUES (%s, %s, %s, %s, %s)""",
[
("Spam and Sausage Lover's Plate", 5, 1, 8, 7.95 ),
("Not So Much Spam Plate", 3, 2, 0, 3.95 ),
("Don't Wany ANY SPAM! Plate", 0, 4, 3, 5.95 )
] )
2015-05-11 15:10:17 +08:00
回复了 zcljy 创建的主题 硬件 大家都在哪买台式机主机的?
预言下,LZ DIY玩这台机子后,LZ媳妇的大姨会经常请LZ上门喝茶聊天讨论各种电脑问题^_^
2015-05-11 00:45:40 +08:00
回复了 mytharcher 创建的主题 设计 再曝一个一直抄袭我网站且多次通知都无动于衷的人
奇怪,没人提到gitlab.com可以免费托管私有代码吗。。。
2015-05-07 18:33:47 +08:00
回复了 tanteng 创建的主题 Python 写的 python 脚本怎样在别人的机子上直接运行
http://cx-freeze.sourceforge.net/

cx_Freeze is a set of scripts and modules for freezing Python scripts into executables, in much the same way that py2exe and py2app do. Unlike these two tools, cx_Freeze is cross platform and should work on any platform that Python itself works on. It supports Python 2.6 or higher (including Python 3).
Download/Install

SourceForge.net Logo
Version 4.3.4, released December 26, 2014

Install by issuing the command

pip install cx_Freeze
2015-05-07 13:59:05 +08:00
回复了 commoccoom 创建的主题 Python 用正则表达式怎么处理中文?
In [30]: s = b'\xe7\xa9\xbf\xe5\xb1\xb1\xe7\x94\xb2\xe5\x88\xb0'

In [31]: sd = s.decode('utf-8')

In [32]: sd
Out[32]: '穿山甲到'

In [33]: rs = re.search('山',sd)

In [34]: rs
Out[34]: <_sre.SRE_Match object; span=(1, 2), match='山'>
2015-04-30 00:10:10 +08:00
回复了 webskyn 创建的主题 C 付费找 VB 编程高手帮忙
这年头VB估计也只有学校用了吧。。。。一般操作word/excel用的是VBA,或者C#
2015-04-29 23:43:00 +08:00
回复了 pc10201 创建的主题 Python 被 pip 坑了~
你是不pip时sudo了,然后运行没sudo?
which pip/which python或者sys.path看下当前python的path
1 ... 36  37  38  39  40  41  42  43  44  45  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3406 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 35ms · UTC 11:07 · PVG 19:07 · LAX 04:07 · JFK 07:07
Developed with CodeLauncher
♥ Do have faith in what you're doing.