😍 สวัสดีจ้าเพื่อนๆ วันนี้แอดจะมารวบรวม Top 10 Machine Learning Projects ให้เพื่อนๆ ได้ศึกษาและลองทำตามดูนะ
.
🔧 มีทั้งวิธีการ และ Source Code อย่างละเอียดเลยนะ ลองทำตามได้แน่เลย หรือใครอยากจะเอาไปเป็นไอเดียในการทำโปรเจคก็ได้เลย
.
ถ้าพร้อมแล้ว ไปอ่านกันและลองทำกันเลยจ้าาา
.
⭐ 1) Cartoonify Image with Machine Learning - เปลี่ยนภาพธรรมดา ให้กลายเป็นการ์ตูน!!
ซึ่งไอเดียของโปรเจคนี้จะทำการเปลี่ยนรูปภาพให้กลายเป็นการ์ตูนด้วย Python และ library machine learning
💥 ใครสนใจโปรเจคนี้กดลิงค์เข้าไปอ่านกันเลย >> https://data-flair.training/blogs/cartoonify-image-opencv-python/
.
⭐ 2) Create your own emoji with Python - สร้าง Emoji หน้าตัวเองด้วย Python
ไอเดียของโปรเจคนี้จะใช้ Machine Learning เพื่อแยกการแสดงออกทางสีหน้าของมนุษย์และจับคู่กับอิโมจิ
💥 ใครสนใจโปรเจคนี้ไออ่านกันเลยจ้า >> https://data-flair.training/blogs/create-emoji-with-deep-learning/
.
⭐ 3) Loan Prediction using Machine Learning - ทำนายจำนวนเงินกู้!!
เป็นการสร้างแบบจำลองและประมาณเงินกู้สำหรับการกู้บ้าน หรืออสังหาริมทรัพย์ต่างๆ ได้อย่างแม่นยำ! โดยจะใช้ข้อมูลจากภาระต่างๆ วุฒิการศึกษา หน้าที่การงานของผู้ใช้งาน มาสร้างเป็นแบบจำลอง แอดว่าเจ๋งเลยนะเนี่ย
💥 ใครที่สนใจโปรเจคนี้ไปอ่านกันเลย >> https://www.kaggle.com/altruistdelhite04/loan-prediction-problem-dataset
.
⭐ 4) MNIST Digit Classification Machine Learning Project - ใช้หุ่นยนต์จำตัวเลขที่เราเขียน
โดยโปรเจคนี้จะใช้ Python ในการจำแนกหลัก MNIST ซึ่งจะช่วยให้หุ่นยนต์สามารถจำตัวเลขที่เราเขียนด้วยลายมือได้ ซึ่งโปรเจคนี้จะต้องใช้ชุดข้อมูล MNIST เพื่อผึกโมเดลโดยใช้ Convolutional Neural Networks
💥 ใครที่สนใจโปรเจคนี้กดลิงค์เลยจ้า >> https://data-flair.training/blogs/python-deep-learning-project-handwritten-digit-recognition/
🗂️ ชุดข้อมูล MNIST ลิงค์นี้เลยจ้า >> https://drive.google.com/file/d/1hJiOlxctFH3uL2yTqXU_1f6c0zLr8V_K/view
.
⭐ 5) Stock Price Prediction using Machine Learning - ทำนายราคาหุ้นด้วย ML
ซึ่งโปรเจคนี้จะมีตัวอย่างชุดข้อมูลราคาหุ้นต่างๆ เพื่อฝึกให้โมเดลเรียนรู้จากชุดข้อมูลและสามารถทำนายราคาหุ้นในอนาคตได้
💥 ใครสนใจมาทำตามกันเลย >> https://data-flair.training/blogs/stock-price-prediction-machine-learning-project-in-python/
🗂️ มี data set ให้ด้วยนะ >> https://www.kaggle.com/c/two-sigma-financial-news/data
.
⭐ 6) Fake News Detection Project - ข่าวลือ! จะหมดไปเมื่อมีโปรเจคนี้
โปรเจคนี้จะใช้ Data set เพื่อฝึกให้เครื่องเรียนรู้ที่จะแยกแยะข่าวปลอมและข่าวจริง
💥 ใครสนใจกดตามลิงค์นี้เลยจ้า >> https://data-flair.training/blogs/advanced-python-project-detecting-fake-news/
🗂️ แจก Data set ไว้ไปฝึกโมเดล >> https://drive.google.com/file/d/1er9NJTLUA3qnRuyhfzuN0XUsoIC4a-_q/view
.
⭐ 7) Music Genre Classification Machine Learning Project - จำแนกประเภทเพลงด้วย ML
โปรเจคนี้จะใช้ Python และ ML เพื่อจำแนกประเภทเพลงที่แตกต่างกันโดยอัตโนมัติ ใครอยากรู้ว่าเพลงที่เราฟังอยู่เป็นเพลงแบบไหนก็สามารถรู้ได้เลย
💥 ใครอยากทำโปรเจคนี้ไปที่ลิงค์นี้เลยจ้า >> https://data-flair.training/blogs/python-project-music-genre-classification/
.
⭐8) Bitcoin Price Predictor Project - มาทำนายราคาบิทคอยน์กันเถอะ!
วันนี้บิทคอยน์จะราคาขึ้นหรือลงก็ไม่ต้องมานั่งกังวลอีกต่อไป โปรเจคนี้จะช่วยให้เราสามารถทำนายราคาของบิทคอยน์ได้อย่างอัตโนมัติ เจ๋งสุดๆ ไปเลย
💥 ใครสนใจกดไปทำตามลิงค์นี้เลยคร้าบ >> https://www.kaggle.com/team-ai/bitcoin-price-prediction/version/1/code
.
⭐9) Speech Emotion Recognition Machine Learning Project - แยกอารมณ์ของคนพูดด้วยเสียง!
โปรเจคนี้จะใช้ Data set เพื่อเรียนรู้และจดจำเสียงของคนพูด จากนั้นก็จะทำการแยกได้ว่าอารมณ์ของคนพูดในตอนนั้นเป็นยังไง โกรธ เหงา เศร้า ซึม รู้ได้หมดเลย!
💥 ใครสนใจไปทำตามกันโลดด >> https://data-flair.training/blogs/python-mini-project-speech-emotion-recognition/
🗂️ แจก Data set ไว้ใช้ฝึกโมเดล >> https://drive.google.com/file/d/1wWsrN2Ep7x6lWqOXfr4rpKGYrJhWc8z7/view
.
⭐ 10) Movie Recommendation System using Machine Learning - ระบบแนะนำหนังด้วย ML
ใครอยากรู้แนวทางของ Netflix ที่ใช้อัลกอริทึมในการแนะนำหนังหรือซีรีส์ให้กับเรา สามารถดูไอเดียได้จากโปรเจคนี้ได้เลยจ้า ซึ่งโปรเจคนี้จะสามารถแนะนำหนัง หรือซีรีส์ได้ตรงตามกลุ่มเป้าหมาย
💥 ใครอยากลองทำ Streaming หนัง/เพลง/ซีรีส์ ก็ดูไอเดียจากโปรเจคนี้ได้เลยจ้า >> https://data-flair.training/blogs/data-science-r-movie-recommendation/
.
🗂️ มี Data set แจกด้วยนะ >> https://drive.google.com/file/d/1Dn1BZD3YxgBQJSIjbfNnmCFlDW2jdQGD/view
.
🙌 เป็นยังไงกันบ้างกับ 10 โปรเจคที่แอดมานำเสนอให้กับเพื่อนๆ ใครลองไปทำดูแล้วได้ผลลัพธ์ยังไงมาแชร์ให้เพื่อนๆ และแอดฟังบ้างนะคร้าบ
.
หวังว่าจะเป็นประโยชน์กับเพื่อนๆ นะครับ 😁
.
borntoDev - 🦖 สร้างการเรียนรู้ที่ดีสำหรับสายไอทีในทุกวัน
同時也有10部Youtube影片,追蹤數超過177萬的網紅Ru's Piano Ru味春捲,也在其Youtube影片中提到,Cross Gate Themes Piano & Violin Medley - Ru's Piano x Kathie Violin 黃品舒 ⬇ Sheet music / WAV file / Spotify / FB & IG Info. as below ⬇ 🧡Violin: Kat...
「c create file」的推薦目錄:
c create file 在 HKFeel Facebook 的最佳貼文
Shortcut Keys System!!
CTRL+A. . . . . . . . . . . . . . . . . Select All
CTRL+C. . . . . . . . . . . . . . . . . Copy
CTRL+X. . . . . . . . . . . . . . . . . Cut
CTRL+V. . . . . . . . . . . . . . . . . Paste
CTRL+Z. . . . . . . . . . . . . . . . . Undo
CTRL+B. . . . . . . . . . . . . . . . . Bold
CTRL+U. . . . . . . . . . . . . . . . . Underline
CTRL+I . . . . . . . . . . . . . . . . . Italic
F1 . . . . . . . . . . . . . . . . . . . . . . Help
F2 . . . . . . . . . . . . . . . . . . . . . Rename selected object
F3 . . . . . . . . . . . . . . . . . . . . . Find all files
F4 . . . . . . . . . . . . . . . . . . . . . Opens file list drop-down in dialogs
F5 . . . . . . . . . . . . . . . . . . . . . Refresh current window
F6 . . . . . . . . . . . . . . . . . . . . . Shifts focus in Windows Explorer
F10 . . . . . . . . . . . . . . . . . . . . Activates menu bar options
ALT+TAB . . . . . . . . . . . . . . . . Cycles between open applications
ALT+F4 . . . . . . . . . . . . . . . . . Quit program, close current window
ALT+F6 . . . . . . . . . . . . . . . . . Switch between current program windows
ALT+ENTER. . . . . . . . . . . . . . Opens properties dialog
ALT+SPACE . . . . . . . . . . . . . . System menu for current window
ALT+¢ . . . . . . . . . . . . . . . . . . opens drop-down lists in dialog boxes
BACKSPACE . . . . . . . . . . . . . Switch to parent folder
CTRL+ESC . . . . . . . . . . . . . . Opens Start menu
CTRL+ALT+DEL . . . . . . . . . . Opens task manager, reboots the computer
CTRL+TAB . . . . . . . . . . . . . . Move through property tabs
CTRL+SHIFT+DRAG . . . . . . . Create shortcut (also right-click, drag)
CTRL+DRAG . . . . . . . . . . . . . Copy File
ESC . . . . . . . . . . . . . . . . . . . Cancel last function
SHIFT . . . . . . . . . . . . . . . . . . Press/hold SHIFT, insert CD-ROM to bypass auto-play
SHIFT+DRAG . . . . . . . . . . . . Move file
SHIFT+F10. . . . . . . . . . . . . . . Opens context menu (same as right-click)
SHIFT+DELETE . . . . . . . . . . . Full wipe delete (bypasses Recycle Bin)
ALT+underlined letter . . . . Opens the corresponding menu
PC Keyboard Shortcuts
Document Cursor Controls
HOME . . . . . . . . . . . . . . to beginning of line or far left of field or screen
END . . . . . . . . . . . . . . . . to end of line, or far right of field or screen
CTRL+HOME . . . . . . . . to the top
CTRL+END . . . . . . . . . . to the bottom
PAGE UP . . . . . . . . . . . . moves document or dialog box up one page
PAGE DOWN . . . . . . . . moves document or dialog down one page
ARROW KEYS . . . . . . . move focus in documents, dialogs, etc.
CTRL+ > . . . . . . . . . . . . next word
CTRL+SHIFT+ > . . . . . . selects word
Windows Explorer Tree Control
Numeric Keypad * . . . Expand all under current selection
Numeric Keypad + . . . Expands current selection
Numeric Keypad – . . . Collapses current selection
¦ . . . . . . . . . . . . . . . . . . Expand current selection or go to first child
‰ . . . . . . . . . . . . . . . . . . Collapse current selection or go to parent
Special Characters
‘ Opening single quote . . . alt 0145
’ Closing single quote . . . . alt 0146
“ Opening double quote . . . alt 0147
“ Closing double quote. . . . alt 0148
– En dash. . . . . . . . . . . . . . . alt 0150
— Em dash . . . . . . . . . . . . . . alt 0151
… Ellipsis. . . . . . . . . . . . . . . . alt 0133
• Bullet . . . . . . . . . . . . . . . . alt 0149
® Registration Mark . . . . . . . alt 0174
© Copyright . . . . . . . . . . . . . alt 0169
™ Trademark . . . . . . . . . . . . alt 0153
° Degree symbol. . . . . . . . . alt 0176
¢ Cent sign . . . . . . . . . . . . . alt 0162
1⁄4 . . . . . . . . . . . . . . . . . . . . . alt 0188
1⁄2 . . . . . . . . . . . . . . . . . . . . . alt 0189
3⁄4 . . . . . . . . . . . . . . . . . . . . . alt 0190
PC Keyboard Shortcuts
Creating unique images in a uniform world! Creating unique images in a uniform world!
é . . . . . . . . . . . . . . . alt 0233
É . . . . . . . . . . . . . . . alt 0201
ñ . . . . . . . . . . . . . . . alt 0241
÷ . . . . . . . . . . . . . . . alt 0247
File menu options in current program
Alt + E Edit options in current program
F1 Universal help (for all programs)
Ctrl + A Select all text
Ctrl + X Cut selected item
Shift + Del Cut selected item
Ctrl + C Copy selected item
Ctrl + Ins Copy selected item
Ctrl + V Paste
Shift + Ins Paste
Home Go to beginning of current line
Ctrl + Home Go to beginning of document
End Go to end of current line
Ctrl + End Go to end of document
Shift + Home Highlight from current position to beginning of line
Shift + End Highlight from current position to end of line
Ctrl + f Move one word to the left at a time
Ctrl + g Move one word to the right at a time
MICROSOFT® WINDOWS® SHORTCUT KEYS
Alt + Tab Switch between open applications
Alt +
Shift + Tab
Switch backwards between open
applications
Alt + Print
Screen
Create screen shot for current program
Ctrl + Alt + Del Reboot/Windows® task manager
Ctrl + Esc Bring up start menu
Alt + Esc Switch between applications on taskbar
F2 Rename selected icon
F3 Start find from desktop
F4 Open the drive selection when browsing
F5 Refresh contents
Alt + F4 Close current open program
Ctrl + F4 Close window in program
Ctrl + Plus
Key
Automatically adjust widths of all columns
in Windows Explorer
Alt + Enter Open properties window of selected icon
or program
Shift + F10 Simulate right-click on selected item
Shift + Del Delete programs/files permanently
Holding Shift
During Bootup
Boot safe mode or bypass system files
Holding Shift
During Bootup
When putting in an audio CD, will prevent
CD Player from playing
WINKEY SHORTCUTS
WINKEY + D Bring desktop to the top of other windows
WINKEY + M Minimize all windows
WINKEY +
SHIFT + M
Undo the minimize done by WINKEY + M
and WINKEY + D
WINKEY + E Open Microsoft Explorer
WINKEY + Tab Cycle through open programs on taskbar
WINKEY + F Display the Windows® Search/Find feature
WINKEY +
CTRL + F
Display the search for computers window
WINKEY + F1 Display the Microsoft® Windows® help
WINKEY + R Open the run window
WINKEY +
Pause /Break
Open the system properties window
WINKEY + U Open utility manager
WINKEY + L Lock the computer (Windows XP® & later)
OUTLOOK® SHORTCUT KEYS
Alt + S Send the email
Ctrl + C Copy selected text
Ctrl + X Cut selected text
Ctrl + P Open print dialog box
Ctrl + K Complete name/email typed in address bar
Ctrl + B Bold highlighted selection
Ctrl + I Italicize highlighted selection
Ctrl + U Underline highlighted selection
Ctrl + R Reply to an email
Ctrl + F Forward an email
Ctrl + N Create a new email
Ctrl + Shift + A Create a new appointment to your calendar
Ctrl + Shift + O Open the outbox
Ctrl + Shift + I Open the inbox
Ctrl + Shift + K Add a new task
Ctrl + Shift + C Create a new contact
Ctrl + Shift+ J Create a new journal entry
WORD® SHORTCUT KEYS
Ctrl + A Select all contents of the page
Ctrl + B Bold highlighted selection
Ctrl + C Copy selected text
Ctrl + X Cut selected text
Ctrl + N Open new/blank document
Ctrl + O Open options
Ctrl + P Open the print window
Ctrl + F Open find box
Ctrl + I Italicize highlighted selection
Ctrl + K Insert link
Ctrl + U Underline highlighted selection
Ctrl + V Paste
Ctrl + Y Redo the last action performed
Ctrl + Z Undo last action
Ctrl + G Find and replace options
Ctrl + H Find and replace options
Ctrl + J Justify paragraph alignment
Ctrl + L Align selected text or line to the left
Ctrl + Q Align selected paragraph to the left
Ctrl + E Align selected
c create file 在 Taipei Ethereum Meetup Facebook 的最佳解答
By Frank Wang
[使用 go-ethereum 1.6 Clique PoA consensus 建立 Private chain (1)] -- by Frank Wang
Ethereum Proof of Authority
在 Ethereum 官方的共識機制是使用 PoW,Miner 必須靠使用算力去解決密碼學問題來取得寫帳(打包 Block)權。但 PoW 機制在私有鏈或聯盟鏈上並不是一個那麼有效率的共識機制,私有鏈的維運者必須花費多餘的算力來維持私有鏈的運作。
而 Proof of Authority 思維是直接指定哪些節點有寫帳權,其他節點透過演算法如果是被授權的節點打包 Block 則判定 Block 有效。
Ethereum Client 中有不同語言的實作,之前 Parity 版本的實作就有提供 PoA 的共識機制(介紹)。而在前段時間發佈的 geth 1.6 也支援了 PoA 的共識機制。不過 geth 的 PoA 使用方法跟機制和 Parity 的版本不同,geth 實作了 ethereum/EIPs#225 一個稱作 Clique 的共識機制。所以這篇主要筆記如何建立一個 geth Clique Private chain。
情境中會使用 4 個節點,分別代表兩個普通的節點發起交易,一個創世塊指定的授權節點,一個後期加入的授權節點來玩玩 Clique 。
安裝 geth
由於 go-ethereum 使用 golang 開發的,所有的程式都被編譯成單一的可執行檔了,執接下載下來就可以直接執行。
geth & tools 1.6 — https://ethereum.github.io/go-ethereum/downloads/
找到相對應 OS 後下載,記得下載 geth & tools 的版本,接下來會使用 geth 1.6 版本的一個創 Private chain 的工具 puppeth 來建立 Clique Private chain。
最後記得將這些執行檔加入 PATH 方便呼叫。
環境準備
待會要建置的環境將會使用 4 個 ethereum 節點,並且全部節點跑在同一台機器上,這樣比較省事。先創好 4 個資料夾,分別叫 node1 node2 signer1 signer2 ,node 是一般的 ethereum client,signer 在接下來的情境中當成打包 block 的角色。
-> % lsnode1 node2 signer1 signer2
建立 Ethereum 帳號
接著我們要替這四個角色各建立一個 Ethereum 帳號。
frank@frank-linux [10:51:22 AM] [~/src/eth-poa] -> % cd node1
frank@frank-linux [10:55:08 AM] [~/src/eth-poa/node1] -> % geth --datadir ./data account newWARN [04–18|10:55:30] No etherbase set and no accounts found as default Your new account is locked with a password. Please give a password. Do not forget this password.Passphrase: Repeat passphrase: Address: {c7873030c2532aafe540d9dfd02a08330ee06465}
在這步驟切換到每個目錄底下,指令 geth --datadir ./data account new 這段指令是指要使用當下目錄底下的 data 目錄當作 geth 存放資料的地方,並且創一個新的 Account。在剛剛建立的 node1, node2, signer1, signer2 都下相同指令創一個帳號。
一下是我創好的每個角色的 Account address:
node1: c7873030c2532aafe540d9dfd02a08330ee06465
node2: 6d650780d493056f679a30b2c65cfa5e07835ad6
signer1: 5cc640ae524f70c39081d65bc699b3b61a67bd3f
signer2: 0fe2d8747d24156b342c9fa5c5e7138cf4047a8d
創好帳號後就可以開始建立 Private chain 了
建立創世塊設定
由於 Clique 並不像 Parity 版本的 PoA 靠設定檔設定授權的節點。Clique 是將授權節點的相關資訊放在 Block Header 中,所以我們必須對創世塊做一些設定才可以讓授權機制生效。(但這並不意味著新增或刪除授權節點需要更換創世塊,晚點介紹怎麼新增授權節點)
Clique 是將授權的資訊放在 extraData 中,但資料結夠的格式並沒有那麼直覺,所以在此使用 geth 1.6 提供的建立 Private Chain 的工具 puppeth 來建立創世塊,puppeth 是各互動式的程式,直接啟動照著指示輸入相關資訊。
frank@frank-linux [11:19:16 AM] [~/src/eth-poa] -> % puppeth+ — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -+| Welcome to puppeth, your Ethereum private network manager || || This tool lets you create a new Ethereum network down to || the genesis block, bootnodes, miners and ethstats servers || without the hassle that it would normally entail. || || Puppeth uses SSH to dial in to remote servers, and builds || its network components out of Docker containers using the || docker-compose toolset. |+ — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -+
Please specify a network name to administer (no spaces, please)> poa_for_fun
這裡會希望你給你的 Private chain 一個名字
Sweet, you can set this via — network=poa_for_fun next time!
INFO [04–18|11:19:21] Administering Ethereum network name=poa_for_funWARN [04–18|11:19:21] No previous configurations found path=/home/frank/.puppeth/poa_for_fun
What would you like to do? (default = stats) 1. Show network stats 2. Configure new genesis 3. Track new remote server 4. Deploy network components> 2
這裡選 2 ,要建立一個新的創世塊設定
Which consensus engine to use? (default = clique) 1. Ethash — proof-of-work 2. Clique — proof-of-authority> 2
共識機制,選 2,Clique PoA
How many seconds should blocks take? (default = 15)> 10
多少秒數會產出一個 Block,在這裡設 10 秒。當然你可以自己設定你想要的
Which accounts are allowed to seal? (mandatory at least one)> 0x5cc640ae524f70c39081d65bc699b3b61a67bd3f> 0x
指定一個 Account address 作為授權打包的角色。這裡使用上面產出的 Signer1 的 address。
Which accounts should be pre-funded? (advisable at least one)> 0xc7873030c2532aafe540d9dfd02a08330ee06465> 0x5cc640ae524f70c39081d65bc699b3b61a67bd3f> 0x
指定要不要事先給一些 ether。這裡選 node1 和 signer1 的 address,當然這隨你指定
Specify your chain/network ID if you want an explicit one (default = random)>
Network Id,直接用 random
Anything fun to embed into the genesis block? (max 32 bytes)>
沒什麼需要特別加入 genesis 的,留空
What would you like to do? (default = stats) 1. Show network stats 2. Save existing genesis 3. Track new remote server 4. Deploy network components> 2
選 2 存檔
Which file to save the genesis into? (default = poa_for_fun.json)> INFO [04–18|11:19:50] Exported existing genesis block
What would you like to do? (default = stats) 1. Show network stats 2. Save existing genesis 3. Track new remote server 4. Deploy network components> ^C
ctrl+c 離開,會在當下目錄看到一個 poa_for_fun.json 檔案。
替 4 個節點初始化 Private chain
使用 geth init 指令,分別替換 4 個 node 的 datadir
frank@frank-linux [11:38:07 AM] [~/src/eth-poa] -> % lsnode1 node2 poa_for_fun.json signer1 signer2frank@frank-linux [11:38:07 AM] [~/src/eth-poa] -> % geth --datadir node1/data init poa_for_fun.json INFO [04–18|11:39:10] Allocated cache and file handles database=/home/frank/src/eth-poa/node1/data/geth/chaindata cache=128 handles=1024INFO [04–18|11:39:10] Writing custom genesis block INFO [04–18|11:39:10] Successfully wrote genesis state hash=5722d7…47e737frank@frank-linux [11:39:10 AM] [~/src/eth-poa] -> % geth --datadir node2/data init poa_for_fun.jsonINFO [04–18|11:39:14] Allocated cache and file handles database=/home/frank/src/eth-poa/node2/data/geth/chaindata cache=128 handles=1024INFO [04–18|11:39:14] Writing custom genesis block INFO [04–18|11:39:14] Successfully wrote genesis state hash=5722d7…47e737frank@frank-linux [11:39:14 AM] [~/src/eth-poa] -> % geth --datadir signer1/data init poa_for_fun.jsonINFO [04–18|11:39:21] Allocated cache and file handles database=/home/frank/src/eth-poa/signer1/data/geth/chaindata cache=128 handles=1024INFO [04–18|11:39:21] Writing custom genesis block INFO [04–18|11:39:21] Successfully wrote genesis state hash=5722d7…47e737frank@frank-linux [11:39:21 AM] [~/src/eth-poa] -> % geth --datadir signer2/data init poa_for_fun.jsonINFO [04–18|11:39:24] Allocated cache and file handles database=/home/frank/src/eth-poa/signer2/data/geth/chaindata cache=128 handles=1024INFO [04–18|11:39:24] Writing custom genesis block INFO [04–18|11:39:24] Successfully wrote genesis state hash=5722d7…47e737
到目前我們已經準備好讓節點可以啟動和互相連線了。
啟動 geth client 並設定 peers 間的連線
分別在 node1, node2 目錄使用指令啟動 geth
geth --datadir ./data --networkid 55661 --port 2000 console
這裡需要注意的是 datadir 參數沒問題,先前的步驟已經在每個節點各自的目錄都建立了 data 目錄。networkid 大家一定都要用同一個值才可以互相連線。port 用來讓 geth 跟其他 geth 連線所 listen 的一個 port,由於四個節點都在本機,所以這裡必須都指定不同的值。以下使用 node1 2000, node2 2001, signer1 2002, signer 2003 當範例。
如果節點是授權打包 block 的節點,那你啟動時要先 unlock 你的 account,這樣才可以進行交易的打包。多帶一個 unlock 參數,以及你要解鎖的 account address。啟動後會要求輸入當時創 account 時的 passphrase。所以在這裡啟動 signer1 和 signer2 時都要用 unlock 參數帶入他們各自的 address 解鎖。
geth --datadir ./data --networkid 55661 --port 2002 --unlock 5cc640ae524f70c39081d65bc699b3b61a67bd3f console
啟動後會看到這樣的結果,如果沒噴任何錯誤就是啟動成功了,同時會啟動一個 console 的互動介面,可以打像是 admin.nodeInfo 這類的指令來操作 geth。
在啟動訊息中有一段
INFO [04–18|12:01:31] RLPx listener up self=enode://87692411dd1af113ccc04d3f6d3d7d47366c81e595525c861c7a3c902ca0a86f46e8d7a837f431536822dbb012f68d942ed96910385805864e990efdf3839a1e@[::]:2000
由於目前是在 private chain 上,沒有設定啟動節點也沒設定 static node,各節點啟動後是沒辦法找到對方的。所以在此我們把 node2, singer1, signer2 都加入 node1 為自己的節點連上。geth 要連上對方的節點就必須好 enode://
在 node2, signer1, signer2 的 geth console 頁面分別打入指令
>admin.addPeer(“enode://87692411dd1af113ccc04d3f6d3d7d47366c81e595525c861c7a3c902ca0a86f46e8d7a837f431536822dbb012f68d942ed96910385805864e990efdf3839a1e@127.0.0.1:2000”)
完成後回到 node1 的 geth console 打入 admin.peers 應該要看到三個節點資訊。
到這步 geth 節點已經連上可以開始進行 PoA 挖礦和交易了。
啟動 Miner
到 signer1 的 console 打入 miner.start() 這時候如果你本機之前沒有啟動過 miner,geth 會先產生 DAG 等 DAG 產生完後就會開始挖礦了。
在 signer1 的 console 會出現正在 mining 的訊息。
其他節點則會收到 import block 的訊息。
Make a transaction
到這裡 Clique 的 Private chain 已經設定完成了,我們可以開始在這條鏈上做一些交易。接下來為了方便會使用 geth 的 console 來做 send ether 交易,如果你不習慣的話也可以使用 mist 這類的 UI 錢包來做。
node1 console
還記得在建立創世塊的時候有先給了 node1 和 signer1 的 address 一些 ether 吧?先用這令看看這些 ether 有沒有真的在鏈上。使用指令 ")" target="_blank">eth.getBalance("") 來查詢。
> eth.getBalance(“c7873030c2532aafe540d9dfd02a08330ee06465”)9.04625697166532776746648320380374280103671755200316906558262375061821325312e+74> eth.getBalance(“6d650780d493056f679a30b2c65cfa5e07835ad6”)0>
確定 node1 有 ether 但 node2 沒有,接著用 eth.sendTransaction 指令來把一些 ether 從 node1 轉到 node2 吧。
現在 node1 的 console 把自己的 Account unlock
> personal.unlockAccount("c7873030c2532aafe540d9dfd02a08330ee06465")
Unlock account c7873030c2532aafe540d9dfd02a08330ee06465Passphrase:true>
轉出 0.05 ether 到 6d650780d493056f679a30b2c65cfa5e07835ad6
>eth.sendTransaction({from:"c7873030c2532aafe540d9dfd02a08330ee06465", to:"6d650780d493056f679a30b2c65cfa5e07835ad6", value: web3.toWei(0.05, "ether")})INFO [04-18|12:39:53] Submitted transaction fullhash=0xa7a9da239b8f96b9f6fe4007ee88773915f034be2365b2dab234fd8c0545aa37 recipient=0xc7873030c2532aafe540d9dfd02a08330ee06465"0xa7a9da239b8f96b9f6fe4007ee88773915f034be2365b2dab234fd8c0545aa37">
如果你 singer1 的 miner 沒關掉的話,在幾秒後就會看到一個含有一筆交易的 block 產出
再來看看 node1 和 node2 的 ether
> " target="_blank">eth.getBalance("c7873030c2532aafe540d9dfd02a08330ee06465")9.04625697166532776746648320380374280103671755200316906558211535061821325312e+74> " target="_blank">eth.getBalance("6d650780d493056f679a30b2c65cfa5e07835ad6")50000000000000000>
交易完成!
加入一個新的信任節點
在 Clique 共識機制中是使用 Clique 提供的 API 來做節點管理,現在只 demo 加入節點進入信任名單。
signer2
signer2 是一開始沒設定在創世塊中信任列表的節點,如果這時候讓它啟動 miner 會怎麼樣呢?會噴一個未授權的錯誤
> miner.start()INFO [04-18|12:49:51] Starting mining operationnull> INFO [04-18|12:49:51] Commit new mining work number=46 txs=0 uncles=0 elapsed=284.189µsWARN [04-18|12:49:51] Block sealing failed err=unauthorized
必須回到已經在授權名單內的節點將新的節點加入。
signer1
回到 signer1 的 console 輸入加入的指令
> clique.propose("0x0fe2d8747d24156b342c9fa5c5e7138cf4047a8d", true)
singer2
接著回到 signer2 的 cosole
開始打包交易了
結語
由於 geth 1.6 才發佈不久,關於 Clique 的相關文章還蠻少的。提供如何使用 geth 1.6 建立一個 Clique private chain 的簡單教學,其實大部分都是我自己在建置時的筆記,內容省略了很多關於 Clique 的一些特性和原理,有興趣的建議直接看 ethereum/EIPs#225。希望這篇可以幫助到使用 geth 但又想用用 PoA 共識機制的同伴們XD
c create file 在 Ru's Piano Ru味春捲 Youtube 的最佳貼文
Cross Gate Themes Piano & Violin Medley - Ru's Piano x Kathie Violin 黃品舒
⬇ Sheet music / WAV file / Spotify / FB & IG Info. as below ⬇
🧡Violin: Kathie
- Youtube:https://www.youtube.com/c/kathieviolin
- FB Page:https://www.facebook.com/piinsue
🧡Piano: RuRu
- FB Page:https://www.facebook.com/ruruspiano
- Instagram:https://www.instagram.com/ruruspiano
📽Photographer: Santon.W
Please subscribe if you want to see more of my piano covers. (❛◡❛✿)
👉Join RuRu's Membership to support me create music videos
➜ https://www.youtube.com/c/RusPiano/join
🎼Ru's Piano Sheet Music Website
▶https://www.mymusicsheet.com/ruspiano
▶https://gumroad.com/ruspiano
🎹Get Piano Sheets and WAV Files for Each Month
▶Join Youtube Memberships: https://www.youtube.com/c/RusPiano/join
▶Patreon: https://www.patreon.com/rusmusic
🎧RuRu's Digital Album
▶Spotify: https://open.spotify.com/album/3ihE5F4EQCuxzeHNoam7fl
▶iTunes/Apple Music: https://music.apple.com/us/album/rus-piano-anime-collection-vol-1/1550223122
▶YouTube Music: https://music.youtube.com/playlist?list=OLAK5uy_lVHcCG8bPBEd8iaMk9acpLO7eNU6Hvhc4
▶amazon: https://www.amazon.com/-/zh_TW/gp/product/B08TRSJVL8
🎹Learn Anime piano easily: https://go.flowkey.com/ruspiano
🐣Support Ru's Piano🐣
▶PayPal: https://paypal.me/ruruspringroll
▶歐付寶: https://bit.ly/donateRuRuSpringRoll
▶ECPay: https://p.ecpay.com.tw/ED8DB07
👘Ru's Piano Merchandise
▶https://go.fandora.co/nku65
🎁Ru's Piano LINE stickers
▶https://line.me/S/sticker/12306838
#CrossGate #SquareEnix #OnlineGame #Piano #Violin #KathieViolin
#クロスゲート #スクウェアエニックス #メドレー #ピアノ #バイオリン
#魔力寶貝 #懷舊歌曲 #鋼琴小提琴 #魔力寶貝鋼琴 #法蘭城 #魔法大學 #伊爾村 #黃品舒
c create file 在 Ru's Piano Ru味春捲 Youtube 的精選貼文
『Senbonzakura 千本桜』Piano & Violin Cover Kathie Violin 黃品舒 x Ru's Piano
⬇ Sheet music / WAV file / Spotify / FB & IG Info. as below ⬇
💚Violin: Kathie (Hatsune Miku)
- Youtube:https://www.youtube.com/c/kathieviolin
- FB Page:https://www.facebook.com/piinsue
🧡Piano: RuRu (Meiko)
- FB Page:https://www.facebook.com/ruruspiano
- Instagram:https://www.instagram.com/ruruspiano
📽Photographer: Santon.W
Please subscribe if you want to see more of my piano covers. (❛◡❛✿)
👉Join RuRu's Membership to support me create music videos
➜ https://www.youtube.com/c/RusPiano/join
🎼「Senbonzakura 千本桜」Sheet Music Link (Piano solo ver.)
▶https://gum.co/ZoPbx
▶https://www.mymusicsheet.com/ruspiano/22956
🎼Ru's Piano Sheet Music Website
▶https://www.mymusicsheet.com/ruspiano
▶https://gumroad.com/ruspiano
🎹Get Piano Sheets and WAV Files for Each Month
▶Join Youtube Memberships: https://www.youtube.com/c/RusPiano/join
▶Patreon: https://www.patreon.com/rusmusic
🎧RuRu's Digital Album
▶Spotify: https://open.spotify.com/album/3ihE5F4EQCuxzeHNoam7fl
▶iTunes/Apple Music: https://music.apple.com/us/album/rus-piano-anime-collection-vol-1/1550223122
▶YouTube Music: https://music.youtube.com/playlist?list=OLAK5uy_lVHcCG8bPBEd8iaMk9acpLO7eNU6Hvhc4
▶amazon: https://www.amazon.com/-/zh_TW/gp/product/B08TRSJVL8
🎹Learn Anime piano easily: https://go.flowkey.com/ruspiano
🐣Support Ru's Piano🐣
▶PayPal: https://paypal.me/ruruspringroll
▶歐付寶: https://bit.ly/donateRuRuSpringRoll
▶ECPay: https://p.ecpay.com.tw/ED8DB07
👘Ru's Piano Merchandise
▶https://go.fandora.co/nku65
🎁Ru's Piano LINE stickers
▶https://line.me/S/sticker/12306838
#Senbonzakura #SenbonzakuraPiano #SenbonzakuraViolin #KathieViolin #MikuCosplay #VOCALOID
#千本桜 #千本桜ピアノ #千本桜バイオリン #黒うさP #初音未來 #紅音鳴子
#千本櫻 #千本櫻鋼琴 #千本櫻小提琴 #千本櫻鋼琴小提琴 #黃品舒 #黑兔P
c create file 在 糖餃子Sweet Dumpling Youtube 的精選貼文
Hello friends! December is finally here! Today we're going to share with you how to make a cutest mini gingerbread houses, it’s also a mug topper.
Christmas is coming. It's so much fun to have with your family to create these cutest mini gingerbread houses. Decorating the gingerbread house can be a great party idea, it's more fun than eating. Especially these tiny gingerbread houses mug toppers, they are adorable.
Making gingerbread dough is super easy. In this video, we’ll show you how to make the best gingerbread dough with fresh ginger to create a natural flavor. Using fresh ginger gives it an intense ginger flavor, and it’s easy to get, too. In addition to the dough recipe, we will also share with you how to easily make royal icing. Are you ready to have fun with us? Enjoy.
This is an #ASMR ver, you can check out the other version that with BGM and Voices in Chinese if you like:
https://youtu.be/f4KKEkmKOsI
---------------------------------------------------------------------------------------------
How to make Mini Gingerbread House Mug Topper Recipe
Mini Gingerbread House Mug Topper Recipe
🎄 Preparation:
➊ A mini gingerbread house template download link: https://drive.google.com/file/d/16UvJW9EbfkjbUShTVKdqI1HlU194e-7c/view
➋ piping bags and nozzles, or make a parchment bag for piping, 2mm is for sticking, 1.5mm is for decoration
🎄 Yields: Can make 14~16 gingerbread houses
✎ Ingredients
🎄 For the cookies
unsalted butter 125g, softened
brown sugar 90g
molasses 58g
egg 1, at room temperature
all purpose flour 370g
baking soda 5g
salt 2.5g
grated ginger 10g
ground cinnamon 1.5g
nutmeg powder 1g
🎄 For the Royal Icing
vanilla extract 1.5g
powdered sugar 200g, sifted
powdered egg white 7.5g
warm water 25g~30g
✎ Instructions
🎄 For the cookies
1. In a large bowl, add butter, sugar and molasses, beat on mid-low speed, mix well until light and smooth.
2. Add egg and ginger, beat on medium speed until well combined. Scrape down the sides and the bottom of the bowl and beat again if needed to combine.
3. Sift the flour, baking soda, ground cinnamon, nutmeg powder and salt.
4. Fold in all dry ingredients, continue to mix until well blended, the dough should come together.
5. Transfer the dough out onto a work surface and knead until the dough is smooth and combined. Wrap the dough with plastic wrap and place in the fridge for 1 hour to chill.
6. Preheat the oven to 170°C.
7. Lightly flour the work surface and roll the dough to about 3mm thick.
8. Dust the dough lightly with flour to avoid sticking. Place the house pattern pieces on the dough, dip the knife into flour and cut out the pattern pieces from the dough (cut the door, but remove it after baking). You will need TWO of each shape.
9. Bake at 170°C for 10 minutes or until the edges are just beginning to brown. Large pieces will need more time.
10. Once baked, cut the door first, and then remove all cookies on racks to cool completely.
🎄 For the royal icing
1. Sieve the 200g of powdered sugar and 7.5g of powdered egg white in a bowl.
2. Add 1.5g of vanilla extract and 25g of warm water and beat at medium speed for 5 minutes.
3. Fill the Pastry Bag With Royal Icing. You will need at least two piping bags, one is for a thick line to glue the pieces of house together. Another one is a thin line to decorate the house. The royal icing is the best icing to use for gingerbread houses, it'll dry hard and last throughout the holiday season.
🎄 Assembling
1. Start with the front and the back pieces and two sides, then take the side piece and stick them together, do the same with the other side.
2. Grab the back piece and give it a nice firm. Then the base of the house is done. Wait for the icing sets before adding the roof.
3. Sticking the roof pieces in the same way, add lines of icing on all the edges, hold them together and allow the icing to set. It's probably best to let this dry overnight that way all the royal icing is definitely hard before decorating.
4. You can decorate with any pattern you like and custom detail. You can practice how to draw a line or draw a pattern on a board or plate before putting them on your house. But remember, once finished the decorating, please let the icing dry for a couple hours. Have fun.
-----------------------------------------------------------------------
Chapters:
00:00 opening
00:32 ingredients
01:28 Making gingerbread dough
04:52 Dividing, rolling and cutting(gingerbread house and gingerbread man)
07:29 Set the oven, let it cool off
08:04 Making Royal icing
09:00 Handmade Piping bag
09:49 Assembling
12:01 Final result
-----------------------------------------------------------------------
* Kevin MacLeod創作的「Deck the Halls」是依據 創用 CC (姓名標示) 4.0 授權使用。 https://creativecommons.org/licenses/by/4.0/
來源: http://incompetech.com/music/royalty-free/index.html?isrc=USUAN1100263
演出者: http://incompetech.com/