you need to get below files first.
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
pragma solidity ^0.4.14; | |
/* | |
Example of how to verify BLS signatures and BGLS aggregate signatures in Ethereum. | |
Signatures are generated using https://github.com/Project-Arda/bgls | |
Code is based on https://github.com/jstoxrocky/zksnarks_example | |
*/ | |
contract BLSExample { |
I couldn't find a good explanation of each step of signTypedData
EIP with examples of inputs and outputs at each step. I wanted this so I could keep track.
Say this is our private key
const privKey = new Buffer(
"c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3",
"hex"
);
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
/*** | |
* Shoutouts: | |
* | |
* Bytecode origin https://www.reddit.com/r/ethereum/comments/6ic49q/any_assembly_programmers_willing_to_write_a/dj5ceuw/ | |
* Modified version of Vitalik's https://www.reddit.com/r/ethereum/comments/6c1jui/delegatecall_forwarders_how_to_save_5098_on/ | |
* Credits to Jorge Izquierdo (@izqui) for coming up with this design here: https://gist.github.com/izqui/7f904443e6d19c1ab52ec7f5ad46b3a8 | |
* Credits to Stefan George (@Georgi87) for inspiration for many of the improvements from Gnosis Safe: https://github.com/gnosis/gnosis-safe-contracts | |
* | |
* This version has many improvements over the original @izqui's library like using REVERT instead of THROWing on failed calls. | |
* It also implements the awesome design pattern for initializing code as seen in Gnosis Safe Factory: https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/ProxyFactory.sol |
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 torch.utils.model_zoo as model_zoo | |
from torchvision.models.resnet import BasicBlock, Bottleneck, ResNet | |
model_urls = { | |
'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth', | |
'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth', | |
'resnet50': 'https://download.pytorch.org/models/resnet50-19c8e357.pth', | |
'resnet101': 'https://download.pytorch.org/models/resnet101-5d3b4d8f.pth', |
#A brief intro into Stateless functions#
So stateless functions are new in React 0.14 which are quite interesting. They look a bit like this.
const Test = ({name, amount}) => {
return <div className="test">{name} has £{amount}</div>;
};
ReactDOM.render(<Test name="ben" amount="-2000" />) // <div className="test">ben has £-200</div>
react + redux + RR
It uses https://gist.github.com/iNikNik/3c1b870f63dc0de67c38 for stores and actions.
1) create redux
const redux = createRedux(state);
2) get requireAccess func => bindCheckAuth to redux
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
{ | |
"env": { | |
"browser": true, | |
"node": true, | |
"es6": true | |
}, | |
"plugins": ["react"], | |
"ecmaFeatures": { |