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
(require | |
[types] | |
[precompiles] | |
[registry] | |
[tools]) | |
(defcontract BLSSignatureVerifier | |
(defn ^:public verify [message public-key signature) | |
(let [message-on-curve (precompiles/hash-to-curve message)] | |
(= |
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 colored | |
import random | |
import trio | |
host = "127.0.0.1" | |
port = 8080 | |
def _mk_msg(_id): | |
return f"query from {_id}" |
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 random | |
import asyncio | |
import colored | |
host = "127.0.0.1" | |
port = 8080 | |
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 trio | |
async def child1(nursery): | |
print("from 1") | |
# will cancel the nursery | |
# raise Exception("there") | |
await trio.sleep(1) |
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 asyncio | |
async def count(delay): | |
# this will block everything :( | |
# time.sleep(2) | |
# will explode the other stuff | |
# raise Exception("hi") |
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
From c47d7ce48eaadf0faf45ec53fc0e8adf0017db7b Mon Sep 17 00:00:00 2001 | |
From: Alex Stokes <[email protected]> | |
Date: Wed, 20 Mar 2019 16:50:03 -0700 | |
Subject: [PATCH] Reorder the per-epoch transition to occur at the start of the | |
state transition | |
--- | |
.../beacon/state_machines/forks/serenity/state_transitions.py | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) |
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
here are the top-level directories in the geth repo at the above commmit. | |
(skipping some things relating to CI or repo management) | |
accounts - an account manager (e.g. perhaps wraps key manager and (tx) signer) | |
build - config/tools for building parts of this repo | |
cmd - the various binary commands exposed in the repo | |
common - series of utilities used across the codebase | |
consensus - defines various consensus algos, like PoW or PoA | |
console - bind console to geth node for CLI interaction | |
containers - dockerfiles |
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
on run {input, parameters} | |
tell application "System Preferences" | |
reveal anchor "Seeing_Display" of pane id "com.apple.preference.universalaccess" | |
end tell | |
tell application "System Events" to tell process "System Preferences" | |
delay 0.1 | |
click checkbox "Use grayscale" of group 0 of window "Accessibility" | |
end tell | |
tell application "System Preferences" to if it is running then quit | |
return |
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 hashlib | |
def version_check(): | |
import sys | |
assert sys.version_info.major >= 3 | |
assert sys.version_info.minor >= 6 | |
assert sys.version_info.micro >= 5 | |
version_check() # using hashlib features from 3.6.5 |
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
from web3 import Web3 | |
import rlp | |
from eth_tester import ( | |
EthereumTester, | |
PyEVMBackend | |
) | |
from web3.providers.eth_tester import ( | |
EthereumTesterProvider, | |
) |