摘要:
Arcpy: 引用当前的地图文档: __author__ = "Brill" #引用当前的地图文档 import arcpy.mapping as mapping mxd = mapping.MapDocument("CURRENT") mxd.title = "Crime Project" mxd 阅读全文
摘要:
__author__ = "Brill" s= 0 for i in range(4): s+= i print("i = {},s = {}".format(i,s)) s 非法路径: fcParcels = "c:\Data\Parcels.shp" 合法路径: fcParcels = "c:/ 阅读全文
摘要:
模块:from module_test import name 路径:os.path.dirname(os.path.dirname(os.path.abspath(__file__))) time模块: time.time() #时间戳 time.sleep(3) #休眠3秒 time.gmtim 阅读全文
摘要:
import time def timmer(func): def warpper(*args,**kwargs): start_time = time.time() func() stop_time = time.time() print("the func time is %s"%(stop_t 阅读全文
摘要:
高阶函数: #Author:Brill 高阶函数 def add(a,b,f): return f(a)+f(b) res = add(3,-6,abs) print(res) 递归: #Author:Brill """ def calc(n): print(n) return calc(n+1) 阅读全文
摘要:
#Author:Brill import sys,time for i in range(50): sys.stdout.write("#") sys.stdout.flush() time.sleep(0.1) #Author:Brill f = open("yesterday2","r",enc 阅读全文
摘要:
Somehow, it seems the love I knew was always the most destructive kind 不知为何,我经历的爱情总是最具毁灭性的的那种 Yesterday when I was young 昨日当我年少轻狂 The taste of life wa 阅读全文
摘要:
#Author:Brill data = {"Beijing":{ "Chaoyang":{ "Shahe":{},"Tiantongyuan":{} },"Haiding":{},"Changping":{} },"Nanjing":{"Xinjiekou":{},"Muxuyuan":{}}," 阅读全文
摘要:
#My python code product_list =[("iphone,5800"), ("Mac pro,9800"), ("coffee,58"), ("Ibook,50"), ("watch,10800"), ("bike,800"), ] shopping_list = [] sal 阅读全文
摘要:
#Author:Brillcount = 0age = 56while count < 3: guess_age = int(input("please guess age :")) if guess_age == age: print("You got it !") break elif gues 阅读全文