- Go through slides https://github.com/MetaMask/IPFS-Ethereum-Hackathon/blob/master/slides/01_DanFinlay_intro_to_ethereum_blockchains/DanFinlay-intro_to_ethereum.pdf
- deploy ballot to test net
- go over solidity language
- deploy ico to test net
- build webapp with truffle
- (stretch) deploy bonding curve token https://github.com/yosriady/continuous-token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tree: | |
def __init__(self, data): | |
self.left = None | |
self.right = None | |
self.data = data | |
def insert(self, data): | |
if self.data: | |
if isinstance(self.data, int): | |
if self.left is None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Basic example of using Python3 and IMAP to read emails in a gmail folder/label. | |
# Remove legacy email.header api use. | |
import sys | |
import imaplib | |
import getpass | |
import email | |
import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Update alternate instances of a model in the database. | |
""" | |
from app.models import Post | |
ids_to_update = list(Post.objects.all().values_list('id', flat=True))[1::2] | |
Post.objects.filter(id__in=ids_to_update).update(some_field='some value') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./k | |
2020.02.25 (c) shakti | |
/ | |
/ | |
\ | |
$k a.k | |
Verb Adverb Noun Type System | |
: set ' each char " a" c \l a.k | |
+ plus flip / over/right i enc name ``ab n *\d [d] |
- https://anders.com/blockchain/blockchain
- Hashing function
- coinbase transaction
- the ledger is all of the transactions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The following was translated from python. | |
// See https://codility.com/media/train/15-DynamicProgramming.pdf | |
const dynamicCoinChanging = (coins, target) => { | |
let n = coins.length; | |
let dp = [0]; | |
for (let i=0; i < target; i++) { | |
dp.push(Number.POSITIVE_INFINITY); | |
} | |
for (let i=0; i <= n; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def export_h5_to_pb(path_to_h5, export_path): | |
# Set the learning phase to Test since the model is already trained. | |
K.set_learning_phase(0) | |
# Load the Keras model | |
keras_model = load_model(path_to_h5) | |
# Build the Protocol Buffer SavedModel at 'export_path' | |
builder = saved_model_builder.SavedModelBuilder(export_path) |
Attendees should do the following before the event to get the most out of it. There will be a 20 minute lecture-overview at the beginning. You can do the prerequisites during the overview if you have not done so by then.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import pprint | |
pp = pprint.PrettyPrinter(indent=2) | |
def Input(): | |
filename = './input.txt' | |
return open(filename) | |
lines = Input().read().split('\n') |