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
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 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 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 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 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 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 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 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 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), |
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
use std::marker::PhantomData; | |
pub trait Trait { | |
type A: Clone + std::fmt::Debug + From<(u64,String)>; | |
type Sub: Subtrait<Self::A>; | |
} | |
pub struct Struct; | |
impl Trait for Struct { | |
type A = (u64, String); | |
type Sub = SubStruct<Self::A>; | |
} |
NewerOlder