Skip to content

Instantly share code, notes, and snippets.

View jsyqrt's full-sized avatar

Jason Carter jsyqrt

View GitHub Profile
含碘食物排行榜(每100克所含)
1.裙带菜(干)(15878 微克)
2.紫菜(干)(4323 微克)
3.海带(鲜)(923 微克)
4.鸡精(766.5 微克)
5.海虹(346 微克)
6.虾皮(264.5 微克)
7.虾酱(166.6 微克)
8.虾米(82.5 微克)
9.可乐(68.4 微克)
tags
cpchain
rpt

Consider Impeach Status in Rpt

  • current rpt calculation method.
@jsyqrt
jsyqrt / xxx.go
Created September 20, 2019 12:24
// Mode defines the type a dpor engine makes.
type Mode uint
// DporMode
const (
NormalMode Mode = iota
FakeMode
DoNothingFakeMode
PbftFakeMode
)
@jsyqrt
jsyqrt / img2ascii.py
Created August 23, 2019 05:26
A python script to convert an image to ASCII image, txt file.
# Python code to convert an image to ASCII image.
import sys, random, argparse
import numpy as np
import math
from PIL import Image
# gray scale level values from:
# http://paulbourke.net/dataformats/asciiart/
@jsyqrt
jsyqrt / sendRawTx.py
Created August 7, 2019 08:27
send raw transaction to cpchain testmainnet or mainnet.
import sys
from cpc_fusion import Web3 as w
def sendRawTransactionTestMainnet():
chainID = 42
endpoint = "http://13.229.143.32:8501"
myAddress = "abb528bffc707c2c507307e426ce810a7ad93ed6"
toAddress = "abb528bffc707c2c507307e426ce810a7ad93ed6"
keystoreFilePath = "/home/jsyqrt/go/src/bitbucket.org/cpchain/chain/examples/testmainnet/data/data22/keystore/key22"
password = "password"
go get -u -v github.com/ramya-rao-a/go-outline
go get -u -v github.com/acroca/go-symbols
go get -u -v github.com/mdempsky/gocode
go get -u -v github.com/rogpeppe/godef
go get -u -v golang.org/x/tools/cmd/godoc
go get -u -v github.com/zmb3/gogetdoc
go get -u -v github.com/golang/lint/golint
go get -u -v github.com/fatih/gomodifytags
go get -u -v golang.org/x/tools/cmd/gorename
go get -u -v sourcegraph.com/sqs/goreturns
@jsyqrt
jsyqrt / proxy.sh
Last active August 11, 2018 12:19
#!/bin/bash
function launchProxy {
ip=127.0.0.1
port=8118
proxy="http://$ip:$port"
# launch shadowsocks local daemon and privoxy service.
  1. create a proxy agent.
from cpchain import chain, config
from cpchain.chain.models import OrderInfo
from cpchain.crypto import RSACipher, get_addr_from_public_key
from cpchain.account import Accounts

w3 = chain.utils.default_w3