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 fastapi import FastAPI, Request | |
from transformers import AutoTokenizer, AutoModel | |
import uvicorn, json, datetime | |
import torch | |
import uuid | |
DEVICE = "cuda" | |
DEVICE_ID = "0" | |
CUDA_DEVICE = f"{DEVICE}:{DEVICE_ID}" if DEVICE_ID else DEVICE |
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
package org.jiacheo.awesome.blockchain; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.List; | |
import org.apache.commons.codec.digest.DigestUtils; | |
import org.jiacheo.awesome.p2p.cmd.codec.JsonUtil; | |
/** | |
* merkel tree simple implement. |
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
// SPDX-License-Identifier: LGPL-3.0-only | |
pragma solidity ^0.8.0; | |
/** | |
* 多签名钱包简单实现。 | |
*/ | |
contract MultisigWallet { | |
///合约拥有者、发布者,还没想好怎么用。 | |
address owner; |
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
package org.jiacheo.awesome.blockchain.encrypt.communication; | |
import java.math.BigInteger; | |
import java.util.concurrent.ThreadLocalRandom; | |
/** | |
* a DHKE simple implementation demo. | |
* Created on 2022/8/23. <br/> contact: <a style="color:yellow;text-decoration:none;" | |
* href="mailto:jiacheo@qipeng.com" target="_blank">jiacheo[at]qipeng.com</a> <br/> | |
* |
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
package org.jiacheo.awesome.blockchain.encrypt.communication; | |
import java.math.BigInteger; | |
import java.util.Random; | |
/** | |
* Created on 2022/8/22. <br/> contact: <a style="color:yellow;text-decoration:none;" | |
* href="mailto:jiacheo@qipeng.com" target="_blank">jiacheo[at]qipeng.com</a> <br/> | |
* | |
* @author jiacheo |
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
0x0578B91D92D62C3ca0dB35CaDe994A124257E3f0 |
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 com.octo.captcha.CaptchaException; | |
import com.octo.captcha.CaptchaQuestionHelper; | |
import com.octo.captcha.component.image.backgroundgenerator.BackgroundGenerator; | |
import com.octo.captcha.component.image.backgroundgenerator.FunkyBackgroundGenerator; | |
import com.octo.captcha.component.image.color.ColorGenerator; | |
import com.octo.captcha.component.image.fontgenerator.FontGenerator; | |
import com.octo.captcha.component.image.fontgenerator.TwistedAndShearedRandomFontGenerator; | |
import com.octo.captcha.component.image.textpaster.RandomTextPaster; | |
import com.octo.captcha.component.image.textpaster.TextPaster; | |
import com.octo.captcha.component.image.wordtoimage.ComposedWordToImage; |