gRPC is a high performant framework to exchange message for remote procedure call. It use protocol buffers for serializing structured data.

RESTful API is a very popular Web Service framework, which allow web developer to exchange json message through http call.

On the perspective of ease of use, REST is definitely easier than gRPC because gRPC requires the developer to define the message struct in the protocol buffer, and compile it to GO module with protoc compiler.

However, on the perspective of performance, gRPC is much faster than REST. Google Cloud run service can now serve both HTTP and gRPC…


Market Index consists of a list of major companies stock price. There should be a correlation between their prices. Here I would like to use the Machine Learning Model (LSTM) to predict the market index with the historical data of certain stocks.

Data Collection

I use the python package yfinance to get the daily stock price. I downloaded 3-year figures including “Open”, “Close”, “High”, “Low”, and “Volume”

Data Preprocessing

The target variable of the prediction is the Index ETL close price rate of return of the next day, which is defined as

target(t) = ( Close(t+1) - Close(t) )/Close(t) * 100%

Since the value…


Just learned the Oscillator of Moving average (OsMA) and RSI from the post. RSI is an useful indicator of trend and momentum. Inspired by that, I want to try to use that as the machine learning feature to predict the future stock return.

Calculation of RSI and its OsMA

Relative Strength (RS) and Relative Strength Indicator (RSI) can be computed from the Moving Average (MA) of the historical positive price difference (%) divided by that of negative price difference (%).

RS = (MA of positive difference) / (MA of negative difference)

RSI = 100–100/(1+RS)

Here is the code of Julia of the computation. …


(和合本) 應當一無掛慮、只要凡事藉著禱告、祈求、和感謝、將你們所要的告訴 神。

(希臘文原文)

source: https://bible.fhl.net

(和合本) 我將這些事告訴你們、是要叫你們在我裏面有平安。在世上你們有苦難.但你們可以放心、我已經勝了世界。

(希臘文原文)

source: https://bible.fhl.net

和合本的 “放心” 原文是(02293)鼓起勇氣,是一個命令語句。


(和合本) 我留下平安給你們、我將我的平安賜給你們.我所賜的、不像世人所賜的.你們心裏不要憂愁、也不要膽怯。

希臘原文:

source: https://bible.fhl.net

今日分享嘅經文係約翰福音14:1

(和合本)

你們心裏不要憂愁.你們信 神、也當信我。

(希臘文)

source: https://bible.fhl.net

“憂愁”原文其實係”不安”,是被動式,有好似水被攪動的意思。即係內心情情緒被攪擾,感到愁煩不安。


承接上文,在研究第58節的希臘文原文,我又發現另一種可能的解法,唔知啱唔啱。

(和合本) 所以我親愛的弟兄們、你們務要堅固不可搖動、常常竭力多作主工、因為知道你們的勞苦、在主裏面不是徒然的。

(希臘原文)

source: https://bible.fhl.net


承接上文,信徒藉著主耶穌基勝過罪和死的權勢。基於57節的勝利帶出林前15:58節的因果關係,就係58節的"所以"來表達之後所講的作主工,奉獻給主用。

(和合本) 所以我親愛的弟兄們、你們務要堅固不可搖動、常常竭力多作主工、因為知道你們的勞苦、在主裏面不是徒然的。

(希臘原文)

source: https://bible.fhl.net

林前15:57所說藉著主耶穌基帶來的勝利,就係勝過罪和死的權勢。基督為我們的罪而死,使我們脫離罪和死的律,從此不再作罪和死的奴隸,而轉移成為主的奴僕。

我因你們肉體的軟弱,就照人的常話對你們說。你們從前怎樣將肢體獻給不潔不法作奴僕,以至於不法;現今也要照樣將肢體獻給義作奴僕,以至於成聖。

(羅馬書 6:19 和合本)

既然作主的奴僕,就當然要作主工,奉獻給主用。(58節) 所以……常常竭力多作主工……

不過在研究希臘文原文,我又發現另一種可能的解法,唔知啱唔啱。下一篇繼續。


承接上文,第一局並不是終局,終局就在57節,神使我們藉著我們的主耶穌基督得勝。

(和合本) 感謝 神、使我們藉著我們的主耶穌基督得勝。

(希臘原文)

source: https://bible.fhl.net

羅馬書 第6章正正就解釋左林前15:57所說的勝利,藉著主耶穌基帶來,就係勝過罪和死的權勢。基督為我們的罪而死,使我們脫離罪和死的律,從此不再作罪和死的奴隸,而轉移成為主的奴僕。所以復活不單單只是不致滅亡,更在於勝過罪成聖。

但現今,你們既從罪裏得了釋放,作了神的奴僕,就有成聖的果子,那結局就是永生。

(羅馬書 6:22 和合本)

基於以上的逆轉勝,而帶出林前15:58節的因果關係,就係58節的"所以"來表達之後所講的作主工,奉獻給主用。下一節,待續。

Matthew Leung

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store