Let your life shine Let your life shine: 5月 2018 5月 2018 ~ Let your life shine

Flatten multidimensional array in Python

Example Assume we have an array which looks like this: import numpy as np arr = np.array([[1,2,3], [4,5]]) If we try to flatten it by using either flatten() or ravel(), it turns out: >>> arr.flatten() array([list([1, 2, 3]), list([4, 5])], dtype=object) >>> arr.ravel() array([list([1,...

【France‧Alsace】酒鄉之路-里屈埃維Riquewihr.希伯維列 Ribeauville

前一天拜訪艾居漢 Eguisheim .圖克漢Turckheim小鎮,今天要往北開到史特拉斯堡還車,沿途會經過有名的酒鄉小鎮 屈埃維Riquewihr和希伯維列 Ribeauville,原以為這兩個小鎮就像艾居漢和圖克漢一樣小小的,沒想到這兩個小鎮大上許多,遊客也較多,而且看到小鎮的用心裝潢,好希望有朝一日能在聖誕假期時再來辦訪這兩座迷人的小鎮! ▲一進城,一樣的酒鄉小鎮風格再度出現,但這次的街道寬廣許多...

【閱讀筆記】小資族如何簡單買保險 - 重點整理 2/ 2

photo credit:博客來 「終身住院醫療」不需要買,它是住院才會理賠,不住院不會賠的。出了院才是花費的開始! 爭議性高的投資型保單 保戶買了這種保單後,自己都搞不清楚買的是「投資」還是「保險」。 投資型保單本身的結構沒有太大的問題,有投資、又有保險,但它的問題是行政費太高。 保險業務員在銷售投資型保單的時候,他本身對投資的這部份 (基金) 專業程度如果跟 (投信、投顧) 公司的理專來做比較的話,是有待加強的。 一般壽險公司它所銷售的投資型保單,大部分是連結壽險公司所喜歡的一些基金,因此投資標的選擇少,不如消費者自己選擇投信或投顧公司所推薦的基...

【投資理財】打造屬於你自己的財富計畫

打造未來的財富需要計畫,而這些計畫需要放慢腳步去思考,不只是你本人需要思考,應該是全家人一起靜下心來討論規劃,並且實際的記錄下來,如此你才能確切的執行。 先理財再投資,理財該理的是「人心」。有些人因為懶惰便放棄理財,這可能會讓你誤判自己的財務狀況;而有些人了解自己多為超額支出,因此有了逃避心理,覺得不管怎樣就是存不到錢,也就不記帳了,遑論要投資了...

【烘焙筆記】德式乳酪布丁塔

此食譜是參考Carol老師的德式乳酪布丁塔 一.塔皮 材料: 低筋麵粉100g 糖粉30g 無鹽奶油50g, 帕馬森起士粉1大匙 蛋黃2個(或全蛋液30g) 為了避免浪費,我是用一顆全蛋,吃起來口感也蠻酥脆的 鹽1/4茶匙 *使用全蛋黃口感更酥 步驟: 1.  所有材料秤量好 2. 無鹽奶油放置室溫回軟切小塊 3. 低筋麵粉使用濾網過篩  ...

Sync Files to Remote Server

I am going to use Google Cloud Platform (GCP) as remote server to sync files. Contents Generate SSH public key and import in GCP Sync files using command line Sync files using IntelliJ IDEA Plugin 1. Generate SSH public key and import in GCP ◎ Download and install Google Cloud SDK ◎ Add a...

【France‧Alsace】酒鄉之路-艾居漢 Eguisheim .圖克漢Turckheim

前一天還在瑞士的阿爾卑斯山區,今日前往有如童話故事般景色的酒鄉小鎮。 亞爾薩斯的酒鄉之路(Route des vins d'Alsace)從南至北綿延170公里,有著超過百個中古世紀就建造的酒鄉小鎮,每個小鎮窗台遍植花草,搭配上色彩鮮豔的建築物,將這條酒鄉之路妝點的如同童話世界般可愛浪漫。 圖片...

TensorFlow + Jupyter + NVidia GPU + Docker + Anaconda + Google Cloud Platform

credit to Allen Day in medium Contents Sign up on Google Cloud Platform Free Tier Create virtual machine instance SSH in browser and terminal Install NVIDIA GPU driver and toolkit Docker and Nvidia-docker Install Docker and Nvidia-docker Install Anaconda Install additional packages 1....

【France‧Provence】香水之都-葛拉斯Grasse

葛拉斯Grasse以花卉和香水聞名,大眾熟悉的香水品牌(Dior、Lancome等)多是葛拉斯Grasse的香水工廠(如 花宮娜Fragonard、佳麗瑪Galimard和莫林娜Molinard等)調配生產,所以若是喜歡收藏香水,別忘記將此香水之都也納入你的行程裡。 ...

Shell Script Usage Notes

Update 05.18.2018  For loop usage Case 1: rename all file of directory in command line. Assume that there are 5 files in a directory as following. f1.txt f2.txt f3.txt f4.txt f5.txt Get files to an array. $ FILES=($(ls)) Print all files $ echo ${FILES[@]} f1.txt f2.txt f3.txt f4.txt f5.txt Print file count $ echo ${#FILES[@]} 5 Syntax to iterate using for loop $ for ((i=0; i<<#NUMBER>;...

How to setup a web server on Mac

Homebrew  Before the installation, we have to install homebrew first. Click here to see official guide. Requirements An Intel CPU  OS X 10.11 or higher  Command Line Tools (CLT) for Xcode: xcode-select --install, developer.apple.com/downloads or Xcode A Bourne-compatible shell for...

Git Add, Commit and Push in one command line.

How to push code in just one command line? $ git add . $ git commit -a -m "commit" (do not need commit message either) $ git push According to btse's answer in Stackoverflow, we can add following function to .bashrc in Linux or .bash_profile in Mac. If you don't have .bash_profile, just create a new one, and put the code snippet in the file. function lazygit() { git add . git commit -a...

【投資理財】在投資之前,該思考的是~!

從踏入指數化投資後,便了解到這會是條長期的投資之路,主要是為了退休生活作準備,因此在投資前,需要考量些因素,我想這部份也該屬於資產配置的一環,不得不去思考好讓整個投資計畫更完整。以下是我針對我自身家庭狀況所列下該考量的部分...