LeetCode: 938-Range Sum of BST 解題紀錄
題目
Given theRead More »LeetCode: 938-Range Sum of BST 解題紀錄root
node of a binary search tree and two integerslow
andhigh
, return the sum of values of all nodes with a value in the inclusive range[low, high]
.
Given theRead More »LeetCode: 938-Range Sum of BST 解題紀錄root
node of a binary search tree and two integerslow
andhigh
, return the sum of values of all nodes with a value in the inclusive range[low, high]
.
The power of the string is the maximum length of a non-empty substring that contains only one unique character. Given a string s, return the power of s.Read More »LeetCode: 1446-Consecutive Characters
Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the binary representation of a number.
Return the decimal value of the number in the linked list.
Read More »LeetCode: 1290-Convert Binary Number in a Linked List to IntegerThe Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, return the Hamming distance between them.Read More »LeetCode: 461-Hamming Distance 解題紀錄
CodeBERT 這一預訓練模型(pre-trained model)提出自《CodeBERT: A Pre-Trained Model for Programming and Natural Languages》。
Read More »[Machine Learning] CodeBERT 使用方法與介紹(附範例程式碼)如果我們想要透過 Python 來撰寫一個腳本,來取得系統剪貼簿的內容或設置一段文字給系統剪貼簿,我們該如何做到呢?撇開使用各式各樣不同的套件不談,其實我們可以使用 subprocess 這一內建的 Python 模組來完成。
Read More »[Python] 使用 subprocess 來存取系統剪貼簿 (clipboard)aitextgen 是一個封裝得很高級的 Python 套件,讓使用者只需要寫短短幾行的程式碼,便能設定好複雜的 AI 模型。它的架構採用了 OpenAI's GPT-2 和 EleutherAI's GPT Neo/GPT-3,也能使用預訓練模型(pre-trained model)繼續進行模型的微調。
Read More »[NLP] 使用 aitextgen 套件來生成文本