I hereby claim:
- I am nopslip on github.
- I am zacharywolff (https://keybase.io/zacharywolff) on keybase.
- I have a public key whose fingerprint is DA3D 9E22 F4CE EBF0 328D 8856 D373 1464 F71C C532
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
sudo su postgres
psql -U postgres
postgres=> SELECT pg_reload_conf();
pragma solidity 0.4.24; | |
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; | |
import "openzeppelin-solidity/contracts/math/SafeMath.sol"; | |
contract VestingVault12 { | |
using SafeMath for uint256; | |
using SafeMath for uint16; | |
After working through a number of different local configs for Python development I've landed on this as my desired setup. My primary use cases are Django, stand alone scripts, and Heroku apps.
While you don't have to run Gitcoin Web from Docker it makes things much easier. For that reason, this guide will stick to a Docker based setup.
Install Docker - https://hub.docker.com/editions/community/docker-ce-desktop-mac/
Confirm docker & docker compose are running on the latest version
pragma solidity >=0.7.0 <0.9.0; | |
contract LeafHash { | |
// encoded user_id, amount | |
event Encoded(bytes encoded_data); | |
// echo leaf_hash_1 | |
event LeafHash1(bytes32 leaf_hash_1); | |
# python 3.9.0 | |
# web3py 5.19.0 - https://github.com/ethereum/web3.py | |
# This script is sample of how to get deterministic address of a contract based on nonce | |
# adapted/modified from https://ethereum.stackexchange.com/a/63235 | |
import rlp | |
from web3 import Web3 | |
base_address = "0x6ac7ea33f8831ea9dcc53393aaa88b25a785dbf0" | |
nonce = 1 |
// SPDX-License-Identifier: MIT | |
pragma solidity 0.6.6; | |
// forked from https://docs.chain.link/docs/get-a-random-number/ | |
import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol"; | |
/** | |
* THIS IS AN EXAMPLE CONTRACT WHICH USES HARDCODED VALUES FOR CLARITY. | |
* PLEASE DO NOT USE THIS CODE IN PRODUCTION. |
Basic NFT mint. Create minimum viable NFT.
You wake up hazy and unsure where you are. There is a creek headed up from the road. You head up the creek into the jungle, hoping it's safer than whats below.
As you ascend the creek you notice gem glistening in the sand below the water.
# from https://milovantomasevic.com/blog/stackoverflow/2021-04-21-convert-csv-to-json-file-in-python/ | |
import csv | |
import json | |
import time | |
def csv_to_json(csvFilePath, jsonFilePath): | |
jsonArray = [] | |
#read csv file | |
with open(csvFilePath, encoding='utf-8') as csvf: |