原创 kafka中文官網資料

http://orchome.com/kafka/index

原创 python類方法,靜態方法和實例方法

class ClassA(object): @staticmethod def func_a(): print('Hello Python') class Classb(object): d

原创 python迭代器

# python迭代器 # Python中 list,truple,str,dict這些都可以被迭代,但他們並不是迭代器。爲什麼? # 因爲和迭代器相比有一個很大的不同,list/truple/map/dict這些數據的大小是確定的,

原创 python裝飾器對帶有參數的函數和無參數的函數進行裝飾

# #使用裝飾器對無參數的函數進行裝飾 # def func(function): # print("---------1---------") # def func_in(): # print("---

原创 輸入兩個時間,求他們的時間差

import time # a = '2019-05-29 09:33:00' # #轉換爲時間數組 # b = time.strptime(a,"%Y-%m-%d %H:%M:%S") # #轉換成時間戳 # c = int(ti