CELO_VALIDATOR_GROUP_ADDRESS=87d7ca6e380fe9c785cab4d6ffc2bf7fec625855 CELO_VALIDATOR_ADDRESS=b0c9fa734e0fac63d9051554e869c33ebcfcec6d
This file contains hidden or 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
name: Deploy Lambda on push to master | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: |
CELO_VALIDATOR_GROUP_ADDRESS=87d7ca6e380fe9c785cab4d6ffc2bf7fec625855 CELO_VALIDATOR_ADDRESS=b0c9fa734e0fac63d9051554e869c33ebcfcec6d
This file contains hidden or 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 random | |
num_samples = 10000000 | |
def inside(p): | |
x, y = random.random(), random.random() | |
return x*x + y*y < 1 | |
count = sc.parallelize(range(0, num_samples)).filter(inside).count() | |
pi = 4 * count / num_samples | |
print(pi) |