上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页
摘要: > 注意,以太坊智能合约里面采用的是公钥非紧凑类型```def gen_secrets_pair(): """ 得到公钥和私钥 :return: """ from coincurve import PrivateKey p = PrivateKey() return p.to_hex(), p.public_key.format(compressed=Fa... 阅读全文
posted @ 2017-12-19 19:38 白云辉 阅读(1533) 评论(0) 推荐(0) 编辑
摘要: ```pragma solidity ^0.4.16;contract Metadata { // 十六进制字符串转换成bytes function hexStr2bytes(string data)returns (bytes){ uint _ascii_0 = 48; uint _ascii_A = 65; uint _ascii_a = ... 阅读全文
posted @ 2017-12-19 16:35 白云辉 阅读(2930) 评论(1) 推荐(0) 编辑
摘要: [比特币白皮书](http://www.8btc.com/wiki/bitcoin-a-peer-to-peer-electronic-cash-system)[以太坊白皮书](https://github.com/ethereum/wiki/wiki/%5B%E4%B8%AD%E6%96%87%5D-%E4%BB%A5%E5%A4%AA%E5%9D%8A%E7%99%BD%E7%9A%AE%E4... 阅读全文
posted @ 2017-12-15 11:47 白云辉 阅读(323) 评论(0) 推荐(0) 编辑
摘要: ```pythonfrom __future__ import unicode_literalsimport jsonfrom time import sleep, time# 中文编码def encode_str(_str): try: return bytearray(_str, "utf-8").hex() except Exception as e: ... 阅读全文
posted @ 2017-12-12 22:25 白云辉 阅读(765) 评论(0) 推荐(0) 编辑
摘要: > 文本相似度算法## minhash[minhash](https://baike.baidu.com/item/MinHash)```1. 把文档A分词形成分词向量L2. 使用K个hash函数,然后每个hash将L里面的分词分别进行hash,然后得到K个被hash过的集合3. 分别得到K个集合中的最小hash,然后组成一个长度为K的hash集合4. 最后用Jaccard index求出两篇文档... 阅读全文
posted @ 2017-11-30 22:13 白云辉 阅读(2197) 评论(0) 推荐(0) 编辑
摘要: ## 合约编译```#!/usr/bin/env python# coding: utf8import jsonimport os# Solc Compilerfrom functools import reduceSOLC = "solc"BASE_PATH = os.path.dirname(os.path.abspath(__file__))src_dir = os.path.join(BA... 阅读全文
posted @ 2017-11-30 18:53 白云辉 阅读(535) 评论(0) 推荐(0) 编辑
摘要: 1. nmesh作为每一个节点的代理2. nmesh同步所有的数据(全部冗余)3. nmesh是一个去中心化的nosql数据库(兼容redis协议)4. 每一个应用需要提供注册自己的主机端口到nmesh上面5. 应用需要提供/health等接口用于健康检查等6. nmesh是一个json-rpc(msgpack-rpc|grpc|thrift等)系统能够让所有的语言调用8. 应用以服务名称的方式注... 阅读全文
posted @ 2017-10-30 23:53 白云辉 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 任何为了更大愿景工作的人,可能会被称为疯子,即使你最终获得成功。任何为了复杂问题工作的人,都会因为不能全面了解挑战而被指责,即使你不可能事先了解一切。任何抓住主动权先行一步的人,都会因为步子太快而受到批评,因为总是有人想让你慢下来。 阅读全文
posted @ 2017-10-27 11:17 白云辉 阅读(177) 评论(0) 推荐(0) 编辑
摘要: ```1. http://blog.csdn.net/Rainloving/article/details/530852162. https://www.58jb.com/html/117.html3. http://blog.csdn.net/gqtcgq/article/details/519305914. http://aaronsa.blog.51cto.com/5157083/18345... 阅读全文
posted @ 2017-10-24 15:57 白云辉 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 标签(空格分隔): ubuntu 最佳操作---> 用linux随时可能会有宕机的危险,谁知道我哪会神经病犯了呢。用deepin宕机的可能性会更高的,所以我才不得不安装一个windows做备份,然后把数据备份到windows上面##备份源列表```sudo cp /etc/apt/sources.list /etc/apt/sources.list.bk```##添加ubuntu的阿里软件源``... 阅读全文
posted @ 2017-09-06 14:29 白云辉 阅读(314) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页