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
#!bin/sh | |
for file in `ls readings/*Heat*.csv`; do python melt-monthly-csv.py $file readings-melted/`basename $file`; done | |
for file in `ls readings/*Power*.csv`; do python melt-monthly-csv.py $file readings-melted/`basename $file`; done | |
for file in `ls readings/*PV*.csv`; do python melt-monthly-csv.py $file readings-melted/`basename $file`; done |
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
//SPDX-License-Identifier: Unlicense | |
pragma solidity ^0.7.0; | |
import "hardhat/console.sol"; | |
contract EmitLargeEvent { | |
event CustomHistorySimple ( | |
bytes32 indexed id, |
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
describe("An afterEach hook", function () { | |
afterEach(function () { | |
console.log("afterEach run!"); | |
}); | |
before(function () { | |
console.log("before TOP"); | |
}); | |
beforeEach(function () { |
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
const STORE_WORD_COST = 20000 | |
const WORD_BYTES = 32 | |
const ONE_ETH = 1000000000000000000 | |
const ONE_GWEI = 1000000000 | |
// Calculate EVM gas cost for storing the given string | |
const storeStringGasCost = str => Math.ceil(Buffer.from(str).length / WORD_BYTES) * STORE_WORD_COST | |
// Calculate ETH cost for storing the given string at given GWEI gas price | |
const storeStringEthCost = (str, gasPriceGwei) => storeStringGasCost(str) * gasPriceGwei * ONE_GWEI / ONE_ETH |
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
pragma solidity 0.6.2; | |
// import "https://github.com/0xcert/ethereum-erc721/src/contracts/tokens/nf-token-enumerable.sol"; | |
import "https://github.com/0xcert/ethereum-erc721/src/contracts/tokens/nf-token-metadata.sol"; | |
import "https://github.com/0xcert/ethereum-erc721/src/contracts/ownership/ownable.sol"; | |
/** | |
* @dev This is an example contract implementation of NFToken with metadata extension. | |
*/ | |
contract HatchNFT is |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >0.6.11 <0.8.0; | |
contract D { | |
uint public x; | |
constructor(uint a) { | |
x = a; | |
} | |
} |
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
// File: link_token/contracts/token/linkERC20Basic.sol | |
pragma solidity >= 0.5.8; | |
/** | |
* @title ERC20Basic | |
* @dev Simpler version of ERC20 interface | |
* @dev see https://github.com/ethereum/EIPs/issues/179 | |
*/ |
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
pragma solidity ^0.5.0; | |
import "github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol"; | |
import "github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Detailed.sol"; | |
import "github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20Mintable.sol"; | |
contract USDCKovan is ERC20, ERC20Detailed, ERC20Mintable { | |
string NAME = "USDCKovan"; |
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
{ | |
"Value": { | |
"_maxLength": 4294967295 | |
}, | |
"Uint32": { | |
"MAX_VALUE": 4294967295, | |
"MIN_VALUE": 0 | |
}, | |
"Hash": { | |
"_length": 32, |
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
{ | |
"Hash": [ | |
67, | |
117, | |
103, | |
112, | |
93, | |
120, | |
39, | |
118, |
NewerOlder