随笔分类 - Python
摘要:Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given"25525511135",return["255.2...
阅读全文
摘要:GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]...
阅读全文
摘要:PermutationsGiven a collection of numbers, return all possible permutations.For example,[1,2,3]have the following permutations:[1,2,3],[1,3,2],[2,1,3]...
阅读全文
摘要:版本Python 2.7。A.Python初印象print 'hello world'B.Python初体验对于字符输入使用raw_input方法,可以在外层使用int来确定输入数据类型。#汇率 兑换RMB_amount = int(raw_input('input your money:'))HK_ex = 0.84US_ex = 6.4HK_amount = RMB_amount / HK_exUS_amount = RMB_amount / US_exprint 'you can change your money for',US_amou
阅读全文
摘要:
我这人关机时间略等于睡觉时间。
为了记录每日睡觉时间以便日后分析作息规律,特用批处理+python做了个小东西。。。其实只用批处理应该就可以了- -但是我不大会。。囧!
看着挺萌的。。。其实就是一个批处理的快捷方式。
python代码功能就是取得当前时间,写入SleepTime.log文件。。。
阅读全文
我这人关机时间略等于睡觉时间。
为了记录每日睡觉时间以便日后分析作息规律,特用批处理+python做了个小东西。。。其实只用批处理应该就可以了- -但是我不大会。。囧!
看着挺萌的。。。其实就是一个批处理的快捷方式。
python代码功能就是取得当前时间,写入SleepTime.log文件。。。
阅读全文
摘要:Inobject-orientedandfunctionalprogramming, animmutable objectis anobjectwhose state cannot be modified after it is created.[1]This is in contrast to amutable object, which can be modified after it is created.Immutable objects are often useful because they are inherentlythread-safe.[1]Other benefits
阅读全文
摘要:clone代码用的是http,没有问题,连接顺畅.当需要commit代码时,google强制使用https://code.google.com,由于某种原因这个地址就打不开了...所以只好使用代理来解决: 1:git好像只支持http代理 2:我有一个socks5代理 3:解决方法出现,使用Privoxy(下载地址http://sourceforge.net/projects/ijbswa/files/Win32/3.0.15%20(beta)/privoxy-setup-3.0.15.exe/download)实现socks5转换成http代理.可能有很多同学没有用过Privoxy,简...
阅读全文
摘要:'''先说方法: 1.写一个批处理TIMESYN.BAT,内容:python E:\Time\time.py 2.创建一个vbs脚本,内容:CreateObject("WScript.Shell").Run "cmd /c E:\Time\TIMESYN.bat",0 //上面E:\Time\TIMESYN.bat为第一步批处理文件的路径 3.win+R,gpedit.msc,在计算机配置或者用户配置中的windows设置中的启动\登录中添加第二步创建的脚本解释:1.time.py是用来设置时间同步服务器的程序;2.创建脚本,运行
阅读全文

浙公网安备 33010602011771号