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
| ``` | |
| forge verify-contract \ | |
| --rpc-url $RPC_URL \ | |
| --verifier etherscan \ | |
| --verifier-url 'https://api.etherscan.io/api' \ | |
| --constructor-args $(cast abi-encode "constructor(uint256,string)" 123 "NFT Factory") \ | |
| $CONTRACT_ADDR \ | |
| src/xxx.sol:xxx | |
| ``` |
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
| FROM fnndsc/python-poetry | |
| RUN apt-get update && apt-get install -y \ | |
| wget \ | |
| build-essential \ | |
| python3-openssl | |
| RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \ | |
| tar -xvzf ta-lib-0.4.0-src.tar.gz && \ | |
| cd ta-lib/ && \ | |
| ./configure --prefix=/usr && \ |
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
| docker rmi -f `docker images | grep ^\<none\> | awk '{ print $3 }'` |
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
| import requests | |
| import re | |
| import time | |
| import sys | |
| BASE_URL = 'https://with.is' | |
| SEARCH_URL = BASE_URL + '/search' | |
| SLEEP_TIME = 5 | |
| GET_URLS = re.compile(r'<a\s+class="link-area\s+needsclick\s+append-anchor"[^>]+>') |
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
| import requests | |
| import json | |
| import time | |
| import sys | |
| pdevice = "pc"; | |
| pversion = "git--v20191107053409" | |
| if len(sys.argv) == 2: | |
| token = sys.argv[1] | |
| else: |
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
| { | |
| "name": "Commitment", | |
| "deploy": { | |
| "args": [] | |
| }, | |
| "messages": [ | |
| { | |
| "name": "current_block", | |
| "selector": 2801424613, | |
| "mutates": false, |
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
| use metadata::{RuntimeMetadata, RuntimeMetadataV4, RuntimeMetadataPrefixed}; | |
| use parity_codec::Decode; | |
| use serde_json::json; | |
| use sr_primitives::OpaqueMetadata; | |
| use ws::{connect, CloseCode}; | |
| use jsonrpc_core_client::transports::parse_response; | |
| use jsonrpc_core::Value; | |
| use url::form_urlencoded::Target; | |
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
| use std::ops::{Add, Index}; | |
| use std::cmp::Eq; | |
| use std::marker::PhantomData; | |
| pub trait Trait<T> { | |
| fn verify(&self, a: T, b: T) -> bool; | |
| } | |
| pub struct VerifierX<T: Add + Eq> { | |
| a: T, |
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
| pub trait Trait<T: std::fmt::Debug> { | |
| fn display(&self, t: T) { | |
| println!("{:?}", t); | |
| } | |
| } | |
| pub struct Dummy; | |
| impl<T: std::fmt::Debug> Trait<T> for Dummy{} |
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
| #[derive(Debug)] | |
| enum Tree { | |
| Leaf(i32), | |
| Node(Box<Tree>, Box<Tree>), | |
| } | |
| fn main() { | |
| let mut tree = Tree::Leaf(0); | |
| for i in vec!{0,1,2,3,4,5} { | |
| tree = Tree::Node(Box::<Tree>::new(tree), |
NewerOlder