Skip to content

Instantly share code, notes, and snippets.

View microftech65's full-sized avatar
💭
I may be slow to respond.

Brenda Smith microftech65

💭
I may be slow to respond.
View GitHub Profile
Solidity code:
contract c {
function f(uint x) internal returns (uint) {
while (x > 0)
return 2 * f(x - 1);
}
}
Yul IR:
@microftech65
microftech65 / AwardToken.sol
Created January 15, 2020 16:11 — forked from serapath/AwardToken.sol
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.23+commit.124ca40d.js&optimize=false&gist=
import "github/OpenZeppelin/zeppelin-solidity/contracts/token/ERC20/MintableToken.sol";
import "gist/Ballot.sol";
contract AwardToken is MintableToken {
uint quantity;
uint ballotPeriod = 7 hours;
Ballot public currBallot;
address[] public prevWinners;
event log (string _msg);
event winLog (address _win);
@microftech65
microftech65 / ercevocer.js
Created January 3, 2020 22:32
Use solidity ecrecover with signature calculated with eth_sign
// Change accountToSignWith to the address of your account.
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
var accountToSignWith = '0xbedcf417ff2752d996d2ade98b97a6f0bef4beb9';
var message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tubulum fuisse, qua illum, cuius is condemnatus est rogatione, P. Eaedem res maneant alio modo.'
@microftech65
microftech65 / ML0101EN-Reg-NoneLinearRegression-py-v1.ip
Created December 26, 2019 19:49
Microftech65/ML0101EN-Reg-NoneLinearRegression-py-v1.ip...
<script src="https://gist.github.com/Chidambaram30/8e276dae50222416db10e0a52aa34616.js"></script>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.