5-day plot - Wind Speed, Wind Gust and Atmospheric Pressure
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.23; | |
/** | |
* @title ERC20Basic | |
* @dev Simpler version of ERC20 interface | |
* See https://github.com/ethereum/EIPs/issues/179 | |
*/ | |
contract ERC20Basic { | |
function totalSupply() public view returns (uint256); | |
function balanceOf(address who) public view returns (uint256); |
# Update and Upgrade
apt-get update && apt-get upgrade -y
# Install Nginx and Obtain SSL Certs (optional)
add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install certbot python-certbot-nginx
systemctl start nginx
systemctl start nginx.service
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.0 <0.7.0; | |
library GetCode { | |
function at(address _addr) public view returns (bytes memory o_code) { | |
assembly { | |
// retrieve the size of the code, this needs assembly | |
let size := extcodesize(_addr) | |
// allocate output byte array - this could also be done without assembly | |
// by using o_code = new bytes(size) |
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
SOURCE ----> https://github.com/sipa/bech32/blob/master/ref/javascript/bech32.js | |
// Copyright (c) 2017 Pieter Wuille | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
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.5.0; | |
contract UnionPoker { | |
struct UnionPokerGame { | |
bool started; /// has the game started | |
bool ended; /// has the game ended | |
uint256 totalBuyIns; /// total of all buy ins | |
uint256 totalCashOuts; /// total of all cash outs |
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; | |
/// SOURCE: https://raw.githubusercontent.com/yanche/eth_contract_addr_calc/master/contract_addr.sol | |
library ContractAddrCalculator { | |
// NOTE this program works as long as nonce is less than 33 bytes | |
// which is 2**(8*33), almost impossible for a contract to create | |
// so many contracts, also uint256 is only 32bytes |
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
library(httr) | |
library(XML) | |
results = GET("https://en.wikipedia.org/wiki/List_of_cryptocurrencies") | |
doc = readHTMLTable(doc=content(results, "text")) | |
View(doc[1]) | |
library(jsonlite) | |
library(data.table) | |
response = fromJSON('https://www.cryptocompare.com/api/data/coinlist') | |
df = data.table::rbindlist(response$Data, fill=TRUE) |
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.23; | |
/** | |
* @title ERC20Basic | |
* @dev Simpler version of ERC20 interface | |
* See https://github.com/ethereum/EIPs/issues/179 | |
*/ | |
contract ERC20Basic { | |
function totalSupply() public view returns (uint256); | |
function balanceOf(address who) public view returns (uint256); |
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.23; | |
// There are no compiler errors but what could potentially go wrong here? | |
contract ShitTokenICO { | |
// balances of the respective internal accounts | |
uint256 public founderOneFunds; | |
uint256 public founderTwoFunds; | |
uint256 public teamFunds; |
NewerOlder