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 python_graphql_client import GraphqlClient | |
import json | |
from pprint import pformat | |
from multiprocessing import Pool | |
import concurrent.futures | |
from itertools import repeat , chain | |
import math | |
import os |
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.24; | |
/** | |
* @title SafeMath | |
* @dev Math operations with safety checks that revert on error | |
*/ | |
library SafeMath { | |
/** | |
* @dev Multiplies two numbers, reverts on overflow. |
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.24; | |
import "./SafeMath.sol"; | |
/** | |
* @title ERC20 standard token implementation. | |
* @dev Standard ERC20 token. This contract follows the implementation at https://goo.gl/mLbAPJ. | |
* @dev Generously borrowed code from Open Zepplin Implementation at https://rb.gy/tbviaq | |
*/ | |
// contract Token is | |
// ERC20 |
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.22 <0.7.0; | |
/** | |
* @title Storage | |
* @dev Store & retrieve value in a variable | |
*/ | |
contract Storage { | |
uint256 number; |
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 plot_decision_boundary_gpu(pred_func): | |
# Set min and max values and give it some padding | |
x_min, x_max = train_X[:, 0].min() - .5, train_X[:, 0].max() + .5 | |
y_min, y_max = train_X[:, 1].min() - .5, train_X[:, 1].max() + .5 | |
h = 0.01 | |
# Generate a grid of points with distance h between them | |
xx, yy = np.meshgrid(np.arange(x_min, x_max, h), np.arange(y_min, y_max, h)) | |
X.set_value((np.c_[xx.ravel(), yy.ravel()]).astype('float32')) | |
#Z = pred_func(np.c_[xx.ravel(), yy.ravel()]) |
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
contract RockPaperScissors | |
{ | |
enum Move {Rock,Paper,Scissors} | |
struct Turn | |
{ | |
address player; | |
Move move; | |
uint bet; | |
} | |
struct Game |