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
| { | |
| "env": { | |
| "browser": true, | |
| "node": true, | |
| "es6": true | |
| }, | |
| "plugins": ["react"], | |
| "ecmaFeatures": { |
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
#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> | 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', |
| /*** | |
| * 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 |
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"
);| 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 { |
you need to get below files first.