Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavhenig authored Jul 14, 2019
1 parent fc4c063 commit 3855e47
Show file tree
Hide file tree
Showing 26 changed files with 32 additions and 0 deletions.
Binary file modified 1. Introduction/1. Questions.docx
Binary file not shown.
Binary file added 1. Introduction/1. Questions.pdf
Binary file not shown.
Binary file modified 1. Introduction/Bitcoin - Introduction.docx
Binary file not shown.
Binary file added 1. Introduction/Bitcoin - Introduction.pdf
Binary file not shown.
Binary file modified 2. How Bitcoin Works/2. Questions.docx
Binary file not shown.
Binary file added 2. How Bitcoin Works/2. Questions.pdf
Binary file not shown.
Binary file modified 2. How Bitcoin Works/How Bitcoin Works.docx
Binary file not shown.
Binary file added 2. How Bitcoin Works/How Bitcoin Works.pdf
Binary file not shown.
Binary file added 3. Bitcoin Core/3. Questions.docx
Binary file not shown.
Binary file added 3. Bitcoin Core/3. Questions.pdf
Binary file not shown.
Binary file modified 3. Bitcoin Core/bitcoin development environment.docx
Binary file not shown.
Binary file not shown.
32 changes: 32 additions & 0 deletions 3. Bitcoin Core/daemonCommands.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os
import subprocess
import time
import re

os.system(r"bitcoind -daemon")
time.sleep(9)

cmd = ['bitcoin-cli', 'getblockchaininfo']
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

output = proc.communicate()[0].decode('ascii') # all blockchaininfo as a string

os.system(r"bitcoin-cli stop")


try:
blocks = re.search('"blocks": (.+?),\n', output).group(1)
except AttributeError:
# not found in the output
blocks = 'not found any blocks' # apply your error handling

try:
diff = re.search('"difficulty": (.+?),\n', output).group(1)
except AttributeError:
# not found in the output
diff = 'not found any difficulty' # apply your error handling



print("blobks:",blocks)
print("difficulty:",diff)
Binary file added 4. Keys, Addresses/4. Questions.pdf
Binary file not shown.
Binary file added 4. Keys, Addresses/Keys, Addresses.pdf
Binary file not shown.
Binary file added 5. Wallets/5. Questions.pdf
Binary file not shown.
Binary file modified 5. Wallets/Wallets.docx
Binary file not shown.
Binary file added 5. Wallets/Wallets.pdf
Binary file not shown.
Binary file modified 6. Transactions/6. Questions.docx
Binary file not shown.
Binary file added 6. Transactions/6. Questions.pdf
Binary file not shown.
Binary file modified 6. Transactions/Transactions.docx
Binary file not shown.
Binary file added 6. Transactions/Transactions.pdf
Binary file not shown.
Binary file modified 7. Advanced Tx and Scripting/7. Questions.docx
Binary file not shown.
Binary file added 7. Advanced Tx and Scripting/7. Questions.pdf
Binary file not shown.
Binary file modified 7. Advanced Tx and Scripting/Advanced Tx and Scripting.docx
Binary file not shown.
Binary file not shown.

0 comments on commit 3855e47

Please sign in to comment.