原创 Python版-LeetCode 學習:無重複字符的最長子串

    來源:力扣(LeetCode) 鏈接:https://leetcode-cn.com/problems/longest-substring-without-repeating-characters 給定一個字符串,請你找出其中不

原创 Python版-LeetCode 學習:零錢兌換問題

給定不同面額的硬幣 coins 和一個總金額 amount。編寫一個函數來計算可以湊成總金額所需的最少的硬幣個數。如果沒有任何一種硬幣組合能組成總金額,返回 -1。 說明:你可以認爲每種硬幣的數量是無限的。 鏈接:https://lee

原创 Python調用impala出現:TypeError: expecting list of size 2 for struct args

 多進程訪問調用impala,出現TypeError: expecting list of size 2 for struct args raise self._value TypeError: expecting list

原创 airflow中出現urllib3.packages.ordered_dict import ordered_dict ImportError: No module named ordere

在重啓airflow1.10(python2版本)中出現日下問題: # airflow -h No handlers could be found for logger "airflow.logging_config" Tracebac

原创 elasticsearch.exceptions.ConnectionTimeout:

Elastic research 報錯: elasticsearch.exceptions.ConnectionTimeout: ConnectionTimeout caused by - ReadTimeoutError(HTTPC

原创 劍指offer 第3題 從尾到頭打印鏈表 (Python)

劍指off第3題  題目描述 輸入一個鏈表,按鏈表從尾到頭的順序返回一個ArrayList。 思考:先要判斷輸入是否爲空,爲空輸出也應爲一個空list 2.循環遍歷 # -*- coding:utf-8 -*- #class ListN

原创 airflow中多進程任務中子進程出現ERROR不被拋出的問題

在Python2.7版的airflow(1.10.1版)中,使用multiprocessing時,子進程出現錯誤,頁面上tree view中各個運行節點無錯誤拋出,如圖view log中也沒有結果信息打印出來: 使用的multiproce

原创 劍指offer 第一題 從二維數組中查找是否存在指定整數值 (Python版)

  題目描述 在一個二維數組中(每個一維數組的長度相同),每一行都按照從左到右遞增的順序排序,每一列都按照從上到下遞增的順序排序。請完成一個函數,輸入這樣的一個二維數組和一個整數,判斷數組中是否含有該整數。 思路:規則數組中    行 

原创 Gitea/git錯誤fatal: unable to access 'https://**.com/**.git/': Couldn't resolve host 'gitea.com'

在搭建遠程的gitea使用時遇到了類似fatal: unable to access 'https://**.com/**.git/': Couldn't resolve host 'github.com'的錯誤,經反覆查看實驗,發現是D

原创 pandas中出現TypeError: cannot replace ['\\N'] with method pad on a DataFrame的解決方式

在使用pandas時,利用dataframe的replace函數進行替換 df.replace(r'\N',None) 出現如下錯誤: TypeError: cannot replace ['\\N'] with method pad

原创 關於sublime text 3在使用virtualenv插件出現cancel build失效的問題

因爲使用使用sublime text 3做爲python方面的編程,有時需要考慮到使用到virtualenv來建立新的單獨環境進行編程。 在進行virtualenv虛擬環境下的編譯時,需要對sublime進行編譯環境配置。 有一種方式是,