- 準備履歷,可參考 https://codingman.cc/resume.pdf
- 刷題 https://leetcode.com/
- 準備面試投影片與自我介紹約 2 ~ 3 分鐘
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
re.sub(r'[^\w\s]', '', c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from linebot import LineBotApi | |
line_uuid = 'qq' | |
line_bot_api = LineBotApi('qq_token') | |
line_bot_api.push_message( | |
line_uuid, | |
TextSendMessage(text='晚安,早點睡')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution: | |
def threeSum(self, nums: List[int]) -> List[List[int]]: | |
if (length := len(nums)) < 3: | |
return [] | |
result_map = {} | |
result = [] | |
targets = [] | |
for i in range(length): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def permutations(data, start_index, end_index): | |
if start_index == end_index: | |
print(data) | |
return | |
for i in range(start_index, end_index): | |
data[i], data[start_index] = data[start_index], data[i] | |
permutations(data, start_index + 1, end_index) | |
data[i], data[start_index] = data[start_index], data[i] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set your java installer here, must with tar.gz | |
java_installer=https://cdn.azul.com/zulu/bin/zulu16.30.15-ca-jre16.0.1-linux_x64.tar.gz | |
installer_name_full="$(basename -- $java_installer)" | |
installer_name="${installer_name_full%.*}" | |
installer_name="${installer_name%.*}" | |
sudo apt-get update && sudo apt-get -y upgrade | |
sudo apt-get -y install git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ____________ | |
# | | | |
# | | | |
# | | | |
# | | | |
# | | | |
# | | | |
# | | | |
# _____________________| |_____________________ | |
# | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import locale | |
def run_cmd(cmd, use_cmd=False): | |
if use_cmd: | |
# windows | |
cmd = ['cmd', '/c'] + cmd | |
# Linux | |
cmd = ['/bin/sh', '-c'] + cmd | |
result = subprocess.run(cmd, stdout=subprocess.PIPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
if __name__ == '__main__': | |
def walk_dir(current_path, recursive=True): | |
result = [] | |
for (parent_path, folder_names, file_names) in os.walk(current_path): | |
# I don't like -> \ <- | |
parent_path = parent_path.replace('\\', '/') | |
if not recursive: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def quick_sort(data: list[int]) -> list[int]: | |
if (length := len(data)) <= 1: | |
return data | |
pivot = data.pop(length // 2) | |
smaller_list = [i for i in data if i < pivot] | |
bigger_list = [i for i in data if i >= pivot] | |
return quick_sort(smaller_list) + [pivot] + quick_sort(bigger_list) |