XpandNotes

exploring the intersection of technology and creativity

Leetcode #4 Median of Two Sorted Arrays

Description Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. Follow up: The overall run time complexity should be O(log (m+n)). E...

Leetcode #3 Longest Substring Without Repeating Characters

Description Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The answer is "abc", with the length ...

Leetcode #2 Add Two Numbers

Description You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two nu...

Leetcode #1 Two Sum

Description Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solutio...

肺炎疫情 (COVID-19) 到 2020 年 12 月的現狀 (自 Kaggle Notebook 翻譯)

來源: https://www.kaggle.com/corochann/covid-19-current-situation-on-december/notebook 此筆記的資料集來源: Johns Hopkins University github repository 最後更新: 2021-02-01 主要重點 綜觀全球疫情走勢 以 折線圖 分析 ...

Machine Learning 與 MLOps 的作業系統設計

Machine Learning 的步驟 本文圖片皆來自參考資料中的網站 Machine Learning (下文簡稱 ML) 具體應該有甚麼流程並沒有一個標準,根據網路搜尋的文章,大致上會把 ML 劃分為 5 至 7 個步驟,在一個沒有公定標準的情況下,我選擇以 Google Cloud Platform 發布的 The 7 Steps of Machine Learning 作為參考...

Exponential Golomb coding

Exponential Golomb coding 摘錄自維基百科,Exponential-Golomb coding (或稱 Exp-Golomb code) 是一種 Universal code,也就是 Exp-Golomb code 能夠映射到所有正整數。 假設輸入為 x ,其編碼步驟為: 以二進位寫下 x + 1 數 x + 1 的二進位數字總共有多少位數,並在 x ...

在 Heroku 上部屬 LINE Bot

計算理論期末專題要做一個 line bot ,但是嘗試部屬的過程碰到許多困難,所以寫了這篇網誌紀錄下來。這個教學會部署一個用 python flask 實作的聊天機器人,使它在接收到文字訊息後,可回傳一模一樣的訊息。然後這次在 windows 平台開發,若要在其他系統請去參考別人的網誌。 Step 1: 在 LINE Developers 創建帳號: 按下 Create 創建一個 Pr...

如何使用 gdb 查看 core dump

寫一個 segmentation fault 的範例程式。 在 Ubuntu 預設是不會產生 core dump 的,想讓系統產生 core dump ,需要輸入以下指令: $ ulimit -c unlimited 其中 ulimit 是限制一些 user 資源的使用量,包含 max user processes 、 open files 的上限、 virtual memory 的上限...

我的 vimrc 和 .tmux.conf 及其他環境設置

vimrc 備份 set clipboard+=unnamed set nu inoremap {<CR> {<CR>}<Esc>ko inoremap [ []<Esc>i inoremap ' ''<Esc>i inoremap " ""<Esc>i inoremap ( ()<Esc>i syntax...